summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <elvis.angelaccio@kde.org>2016-10-05 14:30:14 (GMT)
committerElvis Angelaccio <elvis.angelaccio@kde.org>2016-10-05 14:34:50 (GMT)
commitdeac48717dfdf474f7373bf7d6539d7ec1e7e6bd (patch)
tree87f93cbfd176ea0412f7c3bea57cc795bb2ecd83
parent906aac3ea573ced830aed79594d2b85bb5b8e0a3 (diff)
create_tarball: add sign option
It's now possible to sign tarballs by using the -s (or --sign) switch.
-rwxr-xr-xcreatetarball/create_tarball_kf5.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/createtarball/create_tarball_kf5.rb b/createtarball/create_tarball_kf5.rb
index 8367553..107e079 100755
--- a/createtarball/create_tarball_kf5.rb
+++ b/createtarball/create_tarball_kf5.rb
@@ -22,6 +22,7 @@ options.help = false
options.https = false
options.ask = true
options.translations = true
+options.sign = false
opts = OptionParser.new do |opts|
opts.on("-u", "--user USERNAME", "svn account") do |u|
@@ -49,6 +50,9 @@ opts = OptionParser.new do |opts|
opts.on("-t", "--no-translations", "Don't include translations") do |t|
options.translations = false
end
+ opts.on("-s", "--sign", "Sign tarball") do |s|
+ options.sign = true
+ end
end
begin
@@ -477,5 +481,13 @@ apps.each do |app|
puts ""
print "md5sum: ", `md5sum #{appdata["folder"]}.tar.xz`
print "sha256sum: ", `sha256sum #{appdata["folder"]}.tar.xz`
+
+ if (options.sign)
+ print "-> Signing .. "
+ `gpg -a --output #{appdata["folder"]}.tar.xz.sig --detach-sign #{appdata["folder"]}.tar.xz`
+ puts " done."
+ puts ""
+ print "sha256sum: ", `sha256sum #{appdata["folder"]}.tar.xz.sig`
+ end
end