mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
24 lines
800 B
Bash
Executable file
24 lines
800 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
export CURRENT_VERSION=$1;
|
|
export BUILD_DATE=$(date -R);
|
|
export CURRENT_HASH=${CURRENT_HASH:-$(git rev-parse --short HEAD)};
|
|
export EXTRA_PARAMS=$SHADOWCLJS_EXTRA_PARAMS;
|
|
|
|
# Some cljs reacts on this environment variable for define more
|
|
# performant code on macros (example: rumext)
|
|
export NODE_ENV=production;
|
|
|
|
yarn install || exit 1;
|
|
yarn run build:clean || exit 1;
|
|
yarn run build:styles || exit 1;
|
|
|
|
clojure -J-Xms100M -J-Xmx1000M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${CURRENT_HASH}\"}" $EXTRA_PARAMS || exit 1
|
|
|
|
yarn run build:assets || exit 1;
|
|
yarn run build:copy || exit 1;
|
|
|
|
sed -i -re "s/\%version\%/$CURRENT_VERSION/g" ./target/dist/index.html;
|
|
sed -i -re "s/\%buildDate\%/$BUILD_DATE/g" ./target/dist/index.html;
|