From 2d17e76b6c3a71c84d929389e8644dd61ff192e5 Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:42:09 -0800 Subject: [PATCH] Add option to upload only a single platform --- tasks/upload.rake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/upload.rake b/tasks/upload.rake index 016ab60..ba1f83d 100644 --- a/tasks/upload.rake +++ b/tasks/upload.rake @@ -2,9 +2,10 @@ require 'open3' namespace :overlookinfra do desc "Upload artifacts from the output directory to S3. Requires the AWS CLI to be installed and configured appropriately." - task :upload, [:tag] do |t, args| + task :upload, [:tag, :platform] do |t, args| endpoint = ENV['ENDPOINT_URL'] bucket = ENV['BUCKET_NAME'] + platform = args[:platform] || '' if endpoint.nil? || endpoint.empty? 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 # Ensure the AWS CLI isn't going to fail with the given parameters run_command("#{s3} ls s3://#{bucket}/") - files = Dir.glob("#{__dir__}/../output/*#{munged_tag}*") + files = Dir.glob("#{__dir__}/../output/*#{munged_tag}*#{platform}*") if files.empty? puts "No files for the given tag found in the output directory." end