Skip to content

Commit a810bbe

Browse files
committed
test
1 parent b577ba7 commit a810bbe

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

lib/vanagon/project.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class Project
114114
attr_accessor :extra_files_to_sign
115115
attr_accessor :signing_hostname
116116
attr_accessor :signing_username
117-
attr_accessor :signing_command
117+
attr_accessor :signing_commands
118118
attr_accessor :use_local_signing
119119

120120
# For creating reproducible builds
@@ -171,7 +171,7 @@ def initialize(name, platform) # rubocop:disable Metrics/AbcSize
171171
@extra_files_to_sign = []
172172
@signing_hostname = ''
173173
@signing_username = ''
174-
@signing_command = ''
174+
@signing_commands = []
175175
@use_local_signing = false
176176
@source_date_epoch = (ENV['SOURCE_DATE_EPOCH'] || Time.now.utc).to_i
177177
end

lib/vanagon/project/dsl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def signing_username(username)
395395
#
396396
# @param [String] the command to sign additional files
397397
def signing_command(command)
398-
@project.signing_command = command
398+
@project.signing_commands << command
399399
end
400400

401401
# When true, run the signing commands locally rather than SSHing to a

lib/vanagon/utilities/extra_files_signer.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ def local_commands(project, mktmp, source_dir)
3434
signing_script_path = File.join(run_command("#{mktmp} 2>/dev/null"), File.basename('sign_extra_file'))
3535

3636
project.extra_files_to_sign.each do |file|
37-
commands += [
38-
"echo '#{project.signing_command} #{file}' > #{signing_script_path}",
39-
"/bin/bash #{signing_script_path}",
40-
]
37+
commands += ["echo > #{signing_script_path}"]
38+
commands += project.signing_commands.map { |c| c.gsub('%{file}', file) }
39+
commands += ["/bin/bash #{signing_script_path}"]
4140
end
4241

4342
commands

0 commit comments

Comments
 (0)