Add publish script, only knows about test so far

This commit is contained in:
Nick Pegg 2017-10-14 17:24:31 -07:00
parent 3eedb94180
commit aaef669aa8
2 changed files with 14 additions and 1 deletions

View file

@ -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"
}
}

12
scripts/publish.sh Executable file
View file

@ -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