Skip to content

Instantly share code, notes, and snippets.

@landsman
Created August 13, 2021 06:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save landsman/3a80441cf5ad8b1f5774447b9e2a651e to your computer and use it in GitHub Desktop.
Save landsman/3a80441cf5ad8b1f5774447b9e2a651e to your computer and use it in GitHub Desktop.
test script to send next.js assets to google storage
#!/bin/sh
export ASSETS_FOLDER="../.next/static"
export GCP_BUCKET="eu.apps.trisbee.com/pay"
export VERSION="test-gzip-3"
TIME_START=$(date +%s)
gsutil -m -q \
cp -r -z "js,css,html,json" \
$ASSETS_FOLDER gs://$GCP_BUCKET/util-$VERSION
TIME_END=$(date +%s)
TIME_CONSUMED=$((TIME_END-TIME_START))
echo "Time consumed: ${TIME_CONSUMED} s"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment