dyna3/tools/package-for-deployment.bash
Aaron Fenyes c0294123d8 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.
2025-08-07 17:23:46 -07:00

16 lines
504 B
Bash

# 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"