[SCM] ci-tooling packaging branch, master, updated. 1057b74bf91a718f36ab197ae6eabb076ed20b90

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue Oct 6 11:56:12 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=e560041

The following commit has been merged in the master branch:
commit e5600418249d238051efd72e03bf0407f7d41580
Author: Harald Sitter <sitter at kde.org>
Date:   Tue Oct 6 13:39:36 2015 +0200

    add a source-time build_version attr to CI::Source
    
    this attribute seralizes to version.full in json, not terribly offensive
---
 lib/ci/build_source.rb       | 8 ++++----
 lib/ci/source.rb             | 5 +++++
 test/test_ci_build_source.rb | 2 ++
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/lib/ci/build_source.rb b/lib/ci/build_source.rb
index 1e07366..e2aac37 100644
--- a/lib/ci/build_source.rb
+++ b/lib/ci/build_source.rb
@@ -27,10 +27,10 @@ class VcsSourceBuilder
     end
 
     @source.name = changelog.name
-    build_version = CI::BuildVersion.new(changelog)
-    @source.version = build_version.base if @source.type == :native
-    @source.version = build_version.full if @source.type == :quilt
-    @tar_version = build_version.tar
+    @source.build_version = CI::BuildVersion.new(changelog)
+    @source.version = @source.build_version.base if @source.type == :native
+    @source.version = @source.build_version.full if @source.type == :quilt
+    @tar_version = @source.build_version.tar
   end
 
   def copy_source
diff --git a/lib/ci/source.rb b/lib/ci/source.rb
index 19effd3..23532b6 100644
--- a/lib/ci/source.rb
+++ b/lib/ci/source.rb
@@ -7,6 +7,11 @@ module CI
     attr_accessor :version
     attr_accessor :type
 
+    # Only used in KCIBuilder and only supported at source generation.
+    # This holds the instance of CI::BuildVersion that was used to construct
+    # the version information.
+    attr_accessor :build_version
+
     def []=(key, value)
       var = "@#{key}".to_sym
       instance_variable_set(var, value)
diff --git a/test/test_ci_build_source.rb b/test/test_ci_build_source.rb
index c33c96e..b1d3a1e 100644
--- a/test/test_ci_build_source.rb
+++ b/test/test_ci_build_source.rb
@@ -67,6 +67,7 @@ class VCSBuilderTest < TestCase
     assert_equal(:quilt, r.type)
     assert_equal('hello', r.name)
     assert_equal("2.10+git20150717.1756+#{OS::VERSION_ID}-0", r.version)
+    assert_not_nil(r.build_version)
   end
 
   def test_native
@@ -75,6 +76,7 @@ class VCSBuilderTest < TestCase
     assert_equal(:native, r.type)
     assert_equal('hello', r.name)
     assert_equal("2.10+git20150717.1756+#{OS::VERSION_ID}", r.version)
+    assert_not_nil(r.build_version)
   end
 
   def test_empty_install

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list