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