liberty-hu/script/release.sh

25 lines
492 B
Bash
Raw Normal View History

2023-08-25 12:58:43 +02:00
#!/usr/bin/env sh
2023-08-29 11:40:57 +02:00
while getopts s:o: flag
do
case "${flag}" in
s) server=${OPTARG};;
o) only=${OPTARG};;
esac
done
2023-08-25 12:58:43 +02:00
2023-08-29 11:40:57 +02:00
if [[ $only == backend ]]; then
lein uberjar
else
echo $only
npm run postcss:release
npm run shadow:release
cp -rf public/* resources/public
rm -rf resources/public/js/cljs-runtime
lein uberjar
fi
2023-08-25 12:58:43 +02:00
2023-08-29 11:40:57 +02:00
scp target/*-standalone.jar $server:/opt/prod/liberty-hu.jar
ssh $server "systemctl restart liberty-hu.service"
echo "done!"