Permalink
Browse files

Merge remote branch 'igal/bug/next/4513-automate-packaging' into next

* igal/bug/next/4513-automate-packaging:
  (#4513) Fix and improve package task documentation.
  (#4513) Add support for specifying the signing key id in the deb packaging rake task
  • Loading branch information...
2 parents 11e6d9a + 036aea9 commit 52a27e3460d97a8c56f5f86c19a18a9da2bbed93 @igal igal committed Oct 7, 2010
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/tasks/package.rake
View
11 lib/tasks/package.rake
@@ -1,12 +1,13 @@
namespace :package do
- desc "Create .deb from this git repository, optionally set UNSIGNED=1 to leave unsigned."
+ desc "Create .deb from this git repository, set KEY_ID=your_key to use a specific key or UNSIGNED=1 to leave unsigned."
task :deb => :build_environment do
build_dir = create_workspace('deb')
cd build_dir do
cp_r File.join('ext', 'packaging', 'debian'), '.'
cmd = 'dpkg-buildpackage -a'
cmd << ' -us -uc' if ENV['UNSIGNED'] == '1'
+ cmd << " -k#{ENV['KEY_ID']}" if ENV['KEY_ID']
begin
sh cmd
@@ -17,12 +18,18 @@ namespace :package do
!! Perhaps you want to run:
rake package:deb UNSIGNED=1
+
+!! Or provide a specific key id, e.g.:
+
+ rake package:deb KEY_ID=4BD6EC30
+ rake package:deb KEY_ID=me@example.com
+
HERE
end
end
end
- desc "Create .rpm from this git repository, optionally set UNSIGNED=1 to leave unsigned.."
+ desc "Create .rpm from this git repository, set UNSIGNED=1 to leave unsigned."
task :rpm => :build_environment do
unless File.exists?(File.expand_path('~/.rpmmacros'))
puts <<-HERE

0 comments on commit 52a27e3

Please sign in to comment.