File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ require 'open3'
2
2
3
3
namespace :overlookinfra do
4
4
desc "Upload artifacts from the output directory to S3. Requires the AWS CLI to be installed and configured appropriately."
5
- task :upload , [ :tag ] do |t , args |
5
+ task :upload , [ :tag , :platform ] do |t , args |
6
6
endpoint = ENV [ 'ENDPOINT_URL' ]
7
7
bucket = ENV [ 'BUCKET_NAME' ]
8
+ platform = args [ :platform ] || ''
8
9
9
10
if endpoint . nil? || endpoint . empty?
10
11
abort "You must set the ENDPOINT_URL environment variable to the S3 server you want to upload to."
@@ -21,7 +22,7 @@ namespace :overlookinfra do
21
22
# Ensure the AWS CLI isn't going to fail with the given parameters
22
23
run_command ( "#{ s3 } ls s3://#{ bucket } /" )
23
24
24
- files = Dir . glob ( "#{ __dir__ } /../output/*#{ munged_tag } *" )
25
+ files = Dir . glob ( "#{ __dir__ } /../output/*#{ munged_tag } *#{ platform } * " )
25
26
if files . empty?
26
27
puts "No files for the given tag found in the output directory."
27
28
end
You can’t perform that action at this time.
0 commit comments