From 5e380541f596066ceacc4ec60b21586654484c7c Mon Sep 17 00:00:00 2001 From: An Nguyen Date: Thu, 22 Feb 2024 13:19:25 -0600 Subject: [PATCH] Update uploadEnvsToBitrise.sh --- packages/core-mobile/scripts/github/uploadEnvsToBitrise.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core-mobile/scripts/github/uploadEnvsToBitrise.sh b/packages/core-mobile/scripts/github/uploadEnvsToBitrise.sh index 783be77bb..ced97087e 100755 --- a/packages/core-mobile/scripts/github/uploadEnvsToBitrise.sh +++ b/packages/core-mobile/scripts/github/uploadEnvsToBitrise.sh @@ -46,7 +46,7 @@ zip $file_name .env.* # upload the zip file to bitrise https://devcenter.bitrise.io/en/api/managing-files-in-generic-file-storage.html # 1. create a temporary pre-signed upload URL -file_size=$(stat -f%z $file_name) +file_size=$(ls -l $file_name | awk '{print $5}') response_1=$(curl -H "Authorization: $access_token" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"upload_file_name\": \"$file_name\", \"upload_file_size\": $file_size, \"user_env_key\": \"$bitrise_file_name\"}" -X POST "$base_url/generic-project-files") # 2. upload the file to the pre-signed URL