From 2fa169e28da919ad79d154e64c5be84ff18d16e9 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 21 Jan 2017 14:31:20 +0100 Subject: [PATCH] Add dist.sh script. --- .gitignore | 4 +++- backend/profiles.clj | 7 ++++--- backend/scripts/dist.sh | 6 ++++++ 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100755 backend/scripts/dist.sh diff --git a/.gitignore b/.gitignore index a1e5c55e1..9e18b1954 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ pom.xml node_modules /backend/target/ /backend/resources/public/media +/backend/dist/ /frontend/target/ /frontend/dist/ /frontend/out/ @@ -19,4 +20,5 @@ node_modules /frontend/resources/public/js /frontend/resources/public/view /frontend/resources/public/index.html -/media \ No newline at end of file +/media +/deploy \ No newline at end of file diff --git a/backend/profiles.clj b/backend/profiles.clj index f338fdf5a..3a412ad98 100644 --- a/backend/profiles.clj +++ b/backend/profiles.clj @@ -4,6 +4,7 @@ :jvm-opts ["-Xms50m" "-Xmx200m" "-XX:+UseG1GC"] :main ^:skip-aot uxbox.main} - :prod - {:jvm-opts ^:replace ["-Xms1g" "-Xmx1g" "-XX:+UseG1GC" - "-XX:+AggressiveOpts" "-server"]}} + :uberjar + {:jar-name "uxbox.jar" + :uberjar-name "uxbox-backend.jar" + :target-path "dist/"}} diff --git a/backend/scripts/dist.sh b/backend/scripts/dist.sh new file mode 100755 index 000000000..bc7864cb5 --- /dev/null +++ b/backend/scripts/dist.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +DIR=`dirname $0` +LEIN="$DIR/lein" + +LEIN_SNAPSHOTS_IN_RELEASE=1 $LEIN uberjar