[DRE-commits] [gem2deb] 01/06: Create Rakefile target for releasing to unstable
Antonio Terceiro
terceiro at moszumanska.debian.org
Mon Dec 2 13:03:20 UTC 2013
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository gem2deb.
commit aa37ef7d3e229c6f4046b9a680961d6108a71208
Author: Antonio Terceiro <terceiro at debian.org>
Date: Mon Dec 2 09:10:38 2013 -0300
Create Rakefile target for releasing to unstable
This should make me remember of not uploading with bumping the version
in lib/gem2deb/version.rb (as long as I remember using this target to
make uploads ;-))
Git-Dch: Ignore
---
Rakefile | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/Rakefile b/Rakefile
index 4a4a261..31e8a19 100644
--- a/Rakefile
+++ b/Rakefile
@@ -60,15 +60,32 @@ end
desc "Checks for inconsistencies between version numbers in the code and in debian/changelog"
task :version_check do
- code_version = `ruby -Ilib -rgem2deb/version -e 'puts Gem2Deb::VERSION'`.strip
- debian_version = `dpkg-parsechangelog | grep '^Version: ' | cut -d ' ' -f 2`.strip
- if code_version != debian_version
- msg ="W: Inconsistent version numbers: lib/gem2deb/version.rb says #{code_version}, debian/changelog says #{debian_version}"
+ $code_version = `ruby -Ilib -rgem2deb/version -e 'puts Gem2Deb::VERSION'`.strip
+ $debian_version = `dpkg-parsechangelog | grep '^Version: ' | cut -d ' ' -f 2`.strip
+ if $code_version != $debian_version
+ msg ="W: Inconsistent version numbers: lib/gem2deb/version.rb says #{$code_version}, debian/changelog says #{$debian_version}"
if STDIN.isatty && STDOUT.isatty && STDERR.isatty
# highlight the message in red
puts("\033[31;40m%s\033[m" % msg)
else
puts msg
end
+ fail if ENV.has_key?('VERSION_CHECK_FATAL')
+ end
+end
+
+namespace :release do
+ desc "Releases to Debian sid (very much tied to terceiro's workflow)"
+ task :sid do
+ ENV['VERSION_CHECK_FATAL'] = 'yes'
+ Rake::Task['version_check'].invoke
+ arch = `dpkg-architecture -qDEB_BUILD_ARCH`.strip
+
+ sh 'git buildpackage --git-builder=sbuild'
+ sh 'git buildpackage --git-tag-only'
+ sh 'git push --all'
+ sh 'git push --tags'
+ sh 'debsign'
+ sh "dput ../gem2deb_#{$debian_version}#{arch}.changes"
end
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gem2deb.git
More information about the Pkg-ruby-extras-commits
mailing list