[SCM] ci-tooling packaging branch, master, updated. 9a7ceeed5b56d3cd3cfe2b9654bc42754a47f524

Harald Sitter apachelogger-guest at moszumanska.debian.org
Mon Mar 23 10:55:44 UTC 2015


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

The following commit has been merged in the master branch:
commit 9a7ceeed5b56d3cd3cfe2b9654bc42754a47f524
Author: Harald Sitter <sitter at kde.org>
Date:   Mon Mar 23 11:55:31 2015 +0100

    port builder to new build_version
---
 kci/builder.rb | 26 ++++++++------------------
 1 file changed, 8 insertions(+), 18 deletions(-)

diff --git a/kci/builder.rb b/kci/builder.rb
index 6367dd2..1d5caa5 100755
--- a/kci/builder.rb
+++ b/kci/builder.rb
@@ -5,6 +5,7 @@ require 'fileutils'
 require 'json'
 require 'timeout'
 
+require_relative 'lib/ci/build_version'
 require_relative 'lib/debian/changelog'
 require_relative 'lib/cmake_parser'
 
@@ -60,20 +61,9 @@ WORKSPACE_PATH = ARGV[1]
 `apt-get install -y xz-utils dpkg-dev ruby dput debhelper pkg-kde-tools devscripts python-launchpadlib ubuntu-dev-tools git`
 
 # version
-Dir.chdir('packaging') do
-  $changelog = Changelog.new
-end
-
-# Note that the kubuntu version needs to be part of the *base* version as otherwise
-# different series uploads can end up with exactly the same tar name and launchpad
-# freaks out. So, kubuntu version in base/suffix not revision/suffix.
-eval %x[grep VERSION_ID /etc/os-release].strip
-
-source_name = $changelog.name
-version_suffix = "+git#{DateTime.now().strftime('%Y%m%d.%H%M')}+#{VERSION_ID}"
-base_version = "#{$changelog.version(Changelog::EPOCH | Changelog::BASE)}#{version_suffix}" # <-- needs git version and bzr version possibly
-tar_version = "#{$changelog.version(Changelog::BASE)}#{version_suffix}"
-version = "#{base_version}-0ubuntu0"
+changelog = Changelog.new('packaging')
+version = CI::BuildVersion.new(changelog)
+source_name = changelog.name
 
 # copy sources around
 FileUtils.rm_r('build') if File.exist?('build')
@@ -88,7 +78,7 @@ end
 
 # create orig tar
 Dir.chdir('build/') do
-  tar = "#{source_name}_#{tar_version}.orig.tar"
+  tar = "#{source_name}_#{version.tar}.orig.tar"
   fail 'Failed to create a tarball' unless system("tar -cf #{tar} source")
   fail 'Failed to compress the tarball' unless system("xz -6 #{tar}")
 end
@@ -104,7 +94,7 @@ Dir.chdir('build/source/') do
   }
   args = []
   args << '-b'
-  args << '-v' << version
+  args << '-v' << version.full
   args << '-D' << project.series
   args << '"Automatic Kubuntu Build"'
   fail 'Failed to create changelog entry' unless system(env, 'dch', *args)
@@ -351,8 +341,8 @@ if project.series == 'vivid' && log_data.match(gensymbols_regex)
         system('git reset --hard')
         captures = match.captures
         captures.each do |lib_package|
-          puts "pkgkde-symbolshelper batchpatch -v #{base_version} -c #{architectures_with_log.join(',')} #{logs.join(' ')}"
-          system("pkgkde-symbolshelper batchpatch -v #{base_version} -c #{architectures_with_log.join(',')} #{logs.join(' ')}")
+          puts "pkgkde-symbolshelper batchpatch -v #{version.base} -c #{architectures_with_log.join(',')} #{logs.join(' ')}"
+          system("pkgkde-symbolshelper batchpatch -v #{version.base} -c #{architectures_with_log.join(',')} #{logs.join(' ')}")
           updated_symbols = ($? == 0)
           puts_info("Auto-updated symbols of #{lib_package}")
         end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list