[SCM] ci-tooling packaging branch, master, updated. dc89e7327ef93715b83f0d9d24e1325e6a7893e8
Rohan Garg
rohangarg-guest at moszumanska.debian.org
Thu Apr 30 15:19:22 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=dc89e73
The following commit has been merged in the master branch:
commit dc89e7327ef93715b83f0d9d24e1325e6a7893e8
Author: Rohan Garg <rohan at garg.io>
Date: Thu Apr 30 17:18:05 2015 +0200
Make build_source actually work for both Debian and Kubuntu
---
lib/ci/build_source.rb | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/lib/ci/build_source.rb b/lib/ci/build_source.rb
index 8238b28..bedea44 100644
--- a/lib/ci/build_source.rb
+++ b/lib/ci/build_source.rb
@@ -1,3 +1,9 @@
+require 'date'
+require 'fileutils'
+
+require_relative '../debian/changelog'
+require_relative '../os'
+
class AbstractSource
attr_reader :package_name
attr_reader :package_version
@@ -21,7 +27,7 @@ class VcsSource < AbstractSource
def create_orig_tar
Dir.chdir('build/') do
- tar = "#{source_name}_#{tar_version}.orig.tar"
+ tar = "#{@package_name}_#{@tar_version}.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
@@ -42,7 +48,7 @@ class VcsSource < AbstractSource
end
# FIXME: bloody workaround for kconfigwidgets and kdelibs4support containing legit locale data
- next if source_name == 'kconfigwidgets' || source_name == 'kdelibs4support'
+ next if @package_name == 'kconfigwidgets' || @package_name == 'kdelibs4support'
subbed = File.open(install_file_path).read().gsub(/^.*usr\/share\/locale.*$/, '')
File.open(install_file_path, 'w') do |f|
f << subbed
@@ -61,11 +67,12 @@ class VcsSource < AbstractSource
def log_change
# Create changelog entry
- Dir.chdir("build/source/") do
- env['DEBFULLNAME'] = 'Kubuntu CI'
- env['DEBEMAIL'] = 'kubuntu-ci at lists.launchpad.net'
+ Dir.chdir('build/source/') do
+ ENV['DEBFULLNAME'] = @data[@flavor][:name]
+ ENV['DEBEMAIL'] = @data[@flavor][:email]
# FXIME project undefined
- unless system("dch -b -v #{@package_version} -D #{project.series} 'Automatic Kubuntu Build'")
+ unless system("dch -b -v #{@package_version} -D #{@series} \
+ 'Automatic #{@flavor.capitalize} CI Build'")
fail 'Failed to create changelog entry'
end
end
@@ -79,7 +86,15 @@ class VcsSource < AbstractSource
end
end
- def run
+ def run(args = {})
+ @series = args[:series]
+ @flavor = OS::ID.to_sym
+
+ @data = { ubuntu: { name: 'Kubuntu CI',
+ email: 'kubuntu-ci at lists.launchpad.net' },
+ debian: { name: 'Debian CI',
+ email: 'null at debian.org' }
+ }
# version
changelog = nil
Dir.chdir('packaging') do
@@ -94,7 +109,7 @@ class VcsSource < AbstractSource
@package_name = changelog.name
version_suffix = "+git#{DateTime.now().strftime('%Y%m%d.%H%M')}+#{VERSION_ID}"
@tar_version = "#{changelog.version(Changelog::BASE)}#{version_suffix}"
- @package_version = "#{changelog.version(Changelog::EPOCH | Changelog::BASE)}#{version_suffix}-0ubuntu0" # <-- needs git version and bzr version possibly
+ @package_version = "#{changelog.version(Changelog::EPOCH | Changelog::BASE)}#{version_suffix}-0"
copy_source
create_orig_tar
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list