0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 08:20:45 -05:00
penpot/frontend/scripts/build
mathieu.brunot f0439da293 Frontend can receive hash from CI
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
2021-04-13 11:59:52 +02:00

17 lines
471 B
Bash
Executable file

#!/usr/bin/env bash
set -ex
CURRENT_VERSION=$1;
CURRENT_HASH=${CURRENT_HASH:-$(git rev-parse --short HEAD)};
EXTRA_PARAMS=$SHADOWCLJS_EXTRA_PARAMS;
yarn install || exit 1;
npx gulp clean || exit 1;
npx shadow-cljs release main --config-merge "{:release-version \"${CURRENT_HASH}\"}" $EXTRA_PARAMS || exit 1
npx gulp build || exit 1;
npx gulp dist:clean || exit 1;
npx gulp dist:copy || exit 1;
sed -i -re "s/\%version\%/$CURRENT_VERSION/g" ./target/dist/index.html;