Ensure we create signature before uploading file

This is so that we do not upload anything if signature creation fails.
This commit is contained in:
Allan Odgaard
2014-10-02 21:21:19 +02:00
parent 9a326d1f5f
commit e92759af78

View File

@@ -106,9 +106,10 @@ if __FILE__ == $PROGRAM_NAME
abort "No tag specified" if tag.nil?
if path = ARGV.shift
signature = sign_file(path, keyfile, netinfo.password)
info = base_info.merge({
'url' => create_release(path, destination, tag, description, 'application/x-bzip2'),
'signature' => sign_file(path, keyfile, netinfo.password),
'signature' => signature,
'signee' => netinfo.login
})
STDOUT << info.to_json