[chore] update release script

This commit is contained in:
SouthFox 2023-08-29 17:40:57 +08:00
parent 6f7513ce82
commit cce9975bf1

View file

@ -1,8 +1,24 @@
#!/usr/bin/env sh #!/usr/bin/env sh
while getopts s:o: flag
do
case "${flag}" in
s) server=${OPTARG};;
o) only=${OPTARG};;
esac
done
npm run postcss:release if [[ $only == backend ]]; then
npm run shadow:release lein uberjar
cp -rf public/* resources/public else
rm -rf resources/public/js/cljs-runtime 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
lein uberjar scp target/*-standalone.jar $server:/opt/prod/liberty-hu.jar
ssh $server "systemctl restart liberty-hu.service"
echo "done!"