Skip to content

Commit 21ddc09

Browse files
committed
Add option to upload only a single platform
1 parent 97f7b58 commit 21ddc09

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tasks/upload.rake

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ require 'open3'
22

33
namespace :overlookinfra do
44
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|
66
endpoint = ENV['ENDPOINT_URL']
77
bucket = ENV['BUCKET_NAME']
8+
platform = args[:platform] || ''
89

910
if endpoint.nil? || endpoint.empty?
1011
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
2122
# Ensure the AWS CLI isn't going to fail with the given parameters
2223
run_command("#{s3} ls s3://#{bucket}/")
2324

24-
files = Dir.glob("#{__dir__}/../output/*#{munged_tag}*")
25+
files = Dir.glob("#{__dir__}/../output/*#{munged_tag}*#{platform}*")
2526
if files.empty?
2627
puts "No files for the given tag found in the output directory."
2728
end

0 commit comments

Comments
 (0)