0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-11 09:38:56 -05:00

Add release generation tools

This commit is contained in:
mathieu.brunot 2018-11-25 10:48:40 +01:00
parent bddf3e47c1
commit 026150ff7a
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0
6 changed files with 49 additions and 26 deletions

View file

@ -8,4 +8,6 @@
{:jar-exclusions [#"\.swp|\.swo|user\.clj" #"^media"] {:jar-exclusions [#"\.swp|\.swo|user\.clj" #"^media"]
:jar-name "uxbox.jar" :jar-name "uxbox.jar"
:uberjar-name "uxbox-backend.jar" :uberjar-name "uxbox-backend.jar"
:main uxbox.main
:aot :all
:target-path "dist/"}} :target-path "dist/"}}

View file

@ -198,6 +198,7 @@ gulp.task("dist:brotli", function() {
gulp.task("dist", function(next) { gulp.task("dist", function(next) {
runseq(["dist:clean"], runseq(["dist:clean"],
["dist:template", "dist:scss", "dist:copy"], ["dist:template", "dist:scss", "dist:copy"],
["dist:gzip", "dist:brotli"], next); //["dist:gzip", "dist:brotli"],
next);
}); });

View file

@ -5,10 +5,10 @@ LEIN="$DIR/lein"
LEIN_FAST_TRAMPOLINE=y $LEIN trampoline run -m clojure.main scripts/dist-main.clj LEIN_FAST_TRAMPOLINE=y $LEIN trampoline run -m clojure.main scripts/dist-main.clj
if [ -x "$(command -v gzip)" ]; then #if [ -x "$(command -v gzip)" ]; then
gzip -9c dist/js/main.js > dist/js/main.js.gz # gzip -9c dist/js/main.js > dist/js/main.js.gz
fi #fi
#
if [ -x "$(command -v bro)" ]; then #if [ -x "$(command -v bro)" ]; then
bro --verbose --input dist/js/main.js --output dist/js/main.js.br # bro --verbose --input dist/js/main.js --output dist/js/main.js.br
fi #fi

View file

@ -5,10 +5,10 @@ LEIN="$DIR/lein"
LEIN_FAST_TRAMPOLINE=y $LEIN trampoline run -m clojure.main scripts/dist-view.clj LEIN_FAST_TRAMPOLINE=y $LEIN trampoline run -m clojure.main scripts/dist-view.clj
if [ -x "$(command -v gzip)" ]; then #if [ -x "$(command -v gzip)" ]; then
gzip -9c dist/js/view.js > dist/js/view.js.gz # gzip -9c dist/js/view.js > dist/js/view.js.gz
fi #fi
#
if [ -x "$(command -v bro)" ]; then #if [ -x "$(command -v bro)" ]; then
bro --verbose --input dist/js/view.js --output dist/js/view.js.br # bro --verbose --input dist/js/view.js --output dist/js/view.js.br
fi #fi

View file

@ -5,10 +5,10 @@ LEIN="$DIR/lein"
LEIN_FAST_TRAMPOLINE=y $LEIN trampoline run -m clojure.main scripts/dist-worker.clj LEIN_FAST_TRAMPOLINE=y $LEIN trampoline run -m clojure.main scripts/dist-worker.clj
if [ -x "$(command -v gzip)" ]; then #if [ -x "$(command -v gzip)" ]; then
gzip -9c dist/js/worker.js > dist/js/worker.js.gz # gzip -9c dist/js/worker.js > dist/js/worker.js.gz
fi #fi
#
if [ -x "$(command -v bro)" ]; then #if [ -x "$(command -v bro)" ]; then
bro --verbose --input dist/js/worker.js --output dist/js/worker.js.br # bro --verbose --input dist/js/worker.js --output dist/js/worker.js.br
fi #fi

View file

@ -30,8 +30,25 @@ function run_image {
-p 3449:3449 -p 6060:6060 -p 9090:9090 $IMGNAME:$REV -p 3449:3449 -p 6060:6060 -p 9090:9090 $IMGNAME:$REV
} }
function release_image {
cd frontend
rm -rf ./dist
npm run dist
./scripts/dist-main
./scripts/dist-view
./scripts/dist-worker
echo "Frontend release generated in $(pwd)/dist"
cd ../backend
rm -rf ./dist
./scripts/dist
echo "Backend release generated in $(pwd)/dist"
cd ..
}
function usage { function usage {
echo "USAGE: $0 [ build | run]" echo "USAGE: $0 [ build | run | release ]"
} }
case $1 in case $1 in
@ -41,6 +58,9 @@ case $1 in
run) run)
run_image run_image
;; ;;
release)
release_image
;;
*) *)
usage usage
;; ;;