c4k-forgejo/build-and-move-frontend.sh

29 lines
517 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
# set things
set -o nounset
set -o xtrace
set -o errexit
set -eo pipefail
# dirs
2023-06-07 10:37:27 +00:00
srcDir="/home/$USER/repo/c4k/c4k-forgejo/public/js/"
srcName="main.js"
2023-06-07 10:37:27 +00:00
targetDir="/home/$USER/repo/website/dda-io/content/templates/js/"
2023-06-07 11:18:32 +00:00
targetName="c4k-gitea.js"
2023-06-07 10:37:27 +00:00
echo "build test"
shadow-cljs compile test
echo "test"
node target/node-tests.js
2023-06-07 11:18:32 +00:00
echo "build frontend"
shadow-cljs compile frontend
echo "move and rename file"
cp $srcDir$srcName $targetDir$targetName
2023-06-07 11:18:32 +00:00
echo "run"
(cd $targetDir; lein ring server)