Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/cli-releases/promote_cli_gcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ for platform in "${PLATFORMS[@]}"; do

# Check if versioned file already exists.
if [[ "$DRY_RUN" == "false" ]]; then
if gsutil -q stat "$versioned_path"; then
if gcloud storage objects list --stat --fetch-encrypted-object-hashes "$versioned_path" >/dev/null 2>&1; then
echo "Version $VERSION for $platform already exists in GCS, skipping upload."
continue
fi
Expand All @@ -208,7 +208,7 @@ for platform in "${PLATFORMS[@]}"; do
# Upload versioned binary
echo "Uploading $source_file to $versioned_path"
if [[ "$DRY_RUN" == "false" ]]; then
gsutil -h "Cache-Control:public, max-age=3600" cp "$source_file" "$versioned_path"
gcloud storage cp --cache-control="public, max-age=3600" "$source_file" "$versioned_path"
else
echo "[DRY RUN] Would upload to: $versioned_path"
fi
Expand All @@ -217,7 +217,7 @@ for platform in "${PLATFORMS[@]}"; do
latest_path="gs://$BUCKET/$CHANNEL/$platform/$latest_name"
echo "Copying to $latest_path"
if [[ "$DRY_RUN" == "false" ]]; then
gsutil -h "Cache-Control:public, max-age=300" cp "$source_file" "$latest_path"
gcloud storage cp --cache-control="public, max-age=300" "$source_file" "$latest_path"
else
echo "[DRY RUN] Would copy to: $latest_path (overwriting)"
fi
Expand Down