mirror of
https://github.com/penpot/penpot.git
synced 2025-05-09 22:56:38 +02:00
🔧 Update script names and conditionally build storybook
This commit is contained in:
parent
2b2bc73564
commit
0f16f65d30
5 changed files with 31 additions and 29 deletions
|
@ -4,6 +4,8 @@
|
|||
|
||||
set -ex
|
||||
|
||||
export INCLUDE_STORYBOOK=${BUILD_STORYBOOK:-no};
|
||||
|
||||
export CURRENT_VERSION=$1;
|
||||
export BUILD_DATE=$(date -R);
|
||||
export CURRENT_HASH=${CURRENT_HASH:-$(git rev-parse --short HEAD)};
|
||||
|
@ -20,13 +22,16 @@ rm -rf target/dist;
|
|||
|
||||
clojure -M:dev:shadow-cljs release main --config-merge "{:release-version \"${CURRENT_HASH}-${TS}\"}" $EXTRA_PARAMS || exit 1
|
||||
|
||||
yarn run compile || exit 1;
|
||||
yarn run build:app:assets || exit 1;
|
||||
|
||||
mkdir -p target/dist;
|
||||
rsync -avr resources/public/ target/dist/
|
||||
|
||||
sed -i -re "s/\%version\%/$CURRENT_VERSION/g" ./target/dist/index.html;
|
||||
sed -i -re "s/\%buildDate\%/$BUILD_DATE/g" ./target/dist/index.html;
|
||||
|
||||
# build storybook
|
||||
yarn run storybook:build || exit 1;
|
||||
rsync -avr storybook-static/ target/dist/storybook-static
|
||||
if [ "$INCLUDE_STORYBOOK" = "yes"]; then
|
||||
# build storybook
|
||||
yarn run build:storybook || exit 1;
|
||||
rsync -avr storybook-static/ target/dist/storybook-static;
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue