forked from StudioInfinity/dyna3
Adds a packaging script to help automate deployment. Documents the deployment process in `README.md`. Also, moves `run-examples.sh` into the tools folder that we created for the packaging script. Co-authored-by: Aaron Fenyes <aaron.fenyes@fareycircles.ooo> Reviewed-on: StudioInfinity/dyna3#113 Co-authored-by: Vectornaut <vectornaut@nobody@nowhere.net> Co-committed-by: Vectornaut <vectornaut@nobody@nowhere.net>
16 lines
472 B
Bash
16 lines
472 B
Bash
# set paths. this technique for getting the script location comes from
|
|
# `mklement0` on Stack Overflow
|
|
#
|
|
# https://stackoverflow.com/a/24114056
|
|
#
|
|
TOOLS=$(dirname -- $0)
|
|
SRC="$TOOLS/../app-proto/dist"
|
|
DEST="$TOOLS/../deploy/dyna3"
|
|
|
|
# remove the old hash-named files
|
|
[ -e "$DEST"/dyna3-*.js ] && rm "$DEST"/dyna3-*.js
|
|
[ -e "$DEST"/dyna3-*.wasm ] && rm "$DEST"/dyna3-*.wasm
|
|
[ -e "$DEST"/main-*.css ] && rm "$DEST"/main-*.css
|
|
|
|
# copy the distribution
|
|
cp -r "$SRC/." "$DEST"
|