Skip to content

Commit

Permalink
chore(upload-storage): add script to confirm remote sync (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwambach authored Jul 30, 2020
1 parent 87a5243 commit 822d91c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"electron:download-basemaps": "gsutil -m cp -r gs://esa-cfs-tiles/${npm_package_version}/basemaps ./dist",
"story-packages": "./scripts/create-story-packages.sh",
"clean:story-packages": "find ./storage -type f -name \"*.zip\" -delete",
"upload-storage": "npm run story-packages && gsutil -m rsync -r -x \".DS_Store\" ./storage gs://esa-cfs-storage/$npm_package_version && gsutil -m setmeta -r -h \"Cache-Control: no-cache\" gs://esa-cfs-storage/$npm_package_version/ && npm run clean:story-packages"
"download-storage": "gsutil -m rsync -r gs://esa-cfs-storage/$npm_package_version ./storage && npm run clean:story-packages",
"upload-storage": "./scripts/confirm-storage-upload.sh && npm run story-packages && gsutil -m rsync -r -x \".DS_Store\" ./storage gs://esa-cfs-storage/$npm_package_version && gsutil -m setmeta -r -h \"Cache-Control: no-cache\" gs://esa-cfs-storage/$npm_package_version/ && npm run clean:story-packages"
},
"repository": {
"type": "git",
Expand Down
19 changes: 19 additions & 0 deletions scripts/confirm-storage-upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

echo ""
echo "*** Warning! ***"
echo ""
echo "Please commit your storage files first and check "
echo "if there are any differences between your local copy and the remote files!"
echo ""
echo "Write 'upload' to confirm uploading your files:"

read input

if [ "$input" == "upload" ]; then
echo 'ok'
exit 0
else
echo 'not ok'
exit 1
fi
Binary file modified storage/legend-images/sec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 822d91c

Please sign in to comment.