diff --git a/package.json b/package.json index 3edf65e..a251150 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "build_code": "react-scripts build", "build": "scripts/build_site.js && react-scripts build", "test": "react-scripts test --env=jsdom", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "publish": "scripts/publish.sh" } } diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755 index 0000000..f0c6115 --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +if ! which gsutil > /dev/null; then + echo "You need to install gsutil first!" + exit 1 +fi + +if [ "x$1" = "xtest" ]; then + gsutil -m rsync -d -r build/ gs://test.nickpegg.com +else + echo "I don't know how to publish to prod yet!" +fi