Browse Source

Merge pull request #93 from josephbisch/ecdsa

Add configurable signer to gsign
pull/96/head
Dev Random 5 years ago
parent
commit
1d882f8696
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      bin/gsign

+ 6
- 1
bin/gsign View File

@@ -45,6 +45,10 @@ OptionParser.new do |opts|
opts.on("-d DEST", "--destination DEST", "directory to place signature in") do |v|
@options[:destination] = v
end

opts.on("-p PROG", "--signing_program PROG", "specify signing program to use") do |v|
@options[:program] = v
end
end.parse!

base_dir = Pathname.new(__FILE__).expand_path.dirname.parent
@@ -76,6 +80,7 @@ result['type'] = 'build'
result['optionals'] = optionals

signer = @options[:signer] or raise "must supply signer with --signer"
program = @options[:program] || "gpg --detach-sign"

FileUtils.mkdir_p(destination)

@@ -85,4 +90,4 @@ assert_path = File.join(release_path, "#{package_name}-build.assert")
File.open(assert_path, "w") do |io|
io.write result.to_yaml
end
system!("gpg --detach-sign -u \"#{signer}\" \"#{assert_path}\"")
system!("#{program} -u \"#{signer}\" \"#{assert_path}\"")

Loading…
Cancel
Save