Skip to content

Commit

Permalink
Fixes rsync destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
danielxvu committed Sep 29, 2023
1 parent 5a9c05a commit 590169b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gcp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# You need GCloud Access to the dropbox to run this script

gcloud storage rsync --project=roll20-actual "$1/dist" "$3" --delete-unmatched-destination-objects --cache-control='no-cache' --no-clobber
gcloud storage rsync --project=roll20-actual "$1/translations" "$4" --delete-unmatched-destination-objects --cache-control='no-cache' --no-clobber || true
gcloud storage rsync --project=roll20-actual "$1/dist" "$3" --delete-unmatched-destination-objects --cache-control='no-cache'
gcloud storage rsync --project=roll20-actual "$1/translations" "$4" --delete-unmatched-destination-objects --cache-control='no-cache' || true
5 changes: 2 additions & 3 deletions release-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

CURRENT_DIR=$(printf '%s\n' "${PWD##*/}")

gcloud storage rsync --project=roll20-actual ./ "gs://roll20-cdn/$CDN_SHEETS_FOLDER/$CURRENT_DIR" --delete-unmatched-destination-objects --cache-control='no-cache' --exclude=".*\.css$|.*\.html$|.*\.md$|.*\.sh$|TODO$" --no-clobber
gcloud storage rsync --project=roll20-actual ./dist "gs://roll20-cdn/$CDN_SHEETS_FOLDER/$CURRENT_DIR/dist" --delete-unmatched-destination-objects --cache-control='no-cache' --no-clobber
gcloud storage rsync --project=roll20-actual ./translations "gs://roll20-cdn/$CDN_SHEETS_FOLDER/$CURRENT_DIR/translations" --delete-unmatched-destination-objects --cache-control='no-cache' --no-clobber || true
gcloud storage rsync --project=roll20-actual ./dist "gs://roll20-cdn/$CDN_SHEETS_FOLDER/$CURRENT_DIR/dist" --delete-unmatched-destination-objects --cache-control='no-cache'
gcloud storage rsync --project=roll20-actual ./translations "gs://roll20-cdn/$CDN_SHEETS_FOLDER/$CURRENT_DIR/translations" --delete-unmatched-destination-objects --cache-control='no-cache' || true

2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ touch sync_sheets.sh
echo '#!/bin/bash' > sync_sheets.sh
echo 'set -e' >> sync_sheets.sh
chmod +x sync_sheets.sh
fd dist --type d --strip-cwd-prefix -j1 --exec bash -c 'echo ./gcp.sh \"$(printf "%s" "{//}")\" \"$(printf "gs://roll20-cdn/$CDN_SHEETS_FOLDER/%s\n" "{//}")\" \"$(printf "%s" "{//}")/dist\" \"$(printf "%s" "{//}")/translations\"' | tee -a sync_sheets.sh
fd dist --type d --strip-cwd-prefix -j1 --exec bash -c 'echo ./gcp.sh \"$(printf "%s" "{//}")\" \"$(printf "gs://roll20-cdn/$CDN_SHEETS_FOLDER/%s\n" "{//}")\" \"$(printf "gs://roll20-cdn/$CDN_SHEETS_FOLDER/%s" "{//}")/dist\" \"$(printf "gs://roll20-cdn/$CDN_SHEETS_FOLDER/%s" "{//}")/translations\"' | tee -a sync_sheets.sh

0 comments on commit 590169b

Please sign in to comment.