2021-03-31 01:32:57 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
CURRENT_VERSION=$1;
|
2022-04-06 04:14:18 -05:00
|
|
|
BUILD_DATE=$(date -R);
|
2021-04-13 03:58:30 -05:00
|
|
|
CURRENT_HASH=${CURRENT_HASH:-$(git rev-parse --short HEAD)};
|
2021-03-31 01:32:57 -05:00
|
|
|
EXTRA_PARAMS=$SHADOWCLJS_EXTRA_PARAMS;
|
|
|
|
|
|
|
|
yarn install || exit 1;
|
2023-09-19 05:16:37 -05:00
|
|
|
yarn run build:clean || exit 1;
|
|
|
|
yarn run build:styles || exit 1;
|
|
|
|
|
2023-11-21 07:39:31 -05:00
|
|
|
clojure -J-Xms100M -J-Xmx1000M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${CURRENT_HASH}\"}" $EXTRA_PARAMS || exit 1
|
2023-09-19 05:16:37 -05:00
|
|
|
|
|
|
|
yarn run build:assets || exit 1;
|
|
|
|
yarn run build:copy || exit 1;
|
2021-03-31 01:32:57 -05:00
|
|
|
|
|
|
|
sed -i -re "s/\%version\%/$CURRENT_VERSION/g" ./target/dist/index.html;
|
2022-04-06 04:14:18 -05:00
|
|
|
sed -i -re "s/\%buildDate\%/$BUILD_DATE/g" ./target/dist/index.html;
|