From cce9975bf15194abaa83d077b04817b92a700353 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Tue, 29 Aug 2023 17:40:57 +0800 Subject: [PATCH] [chore] update release script --- script/release.sh | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/script/release.sh b/script/release.sh index a79b1a3..315a772 100644 --- a/script/release.sh +++ b/script/release.sh @@ -1,8 +1,24 @@ #!/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 -npm run shadow:release -cp -rf public/* resources/public -rm -rf resources/public/js/cljs-runtime +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 -lein uberjar +scp target/*-standalone.jar $server:/opt/prod/liberty-hu.jar +ssh $server "systemctl restart liberty-hu.service" + +echo "done!"