Write a deployment packaging script

The packaging script and the configuration files around it are based on
the ones from the

  `Vectornaut/dyna3:demo-summer-2025`

branch.
This commit is contained in:
Aaron Fenyes 2025-08-07 17:23:46 -07:00
parent a4565281d5
commit c0294123d8
4 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,16 @@
# set paths. this technique for getting the script location comes from
# `mklement0` on Stack Overflow
#
# https://stackoverflow.com/a/24114056
#
tools=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
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"