0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

minor changes on manage.sh

This commit is contained in:
Andrey Antukh 2021-01-28 11:56:05 +01:00
parent 2359abf8a5
commit ccafd3a293

View file

@ -87,15 +87,19 @@ function build-backend {
} }
function build-bundle { function build-bundle {
build "frontend"; local build_enabled=${PENPOT_BUNDLE_BUILD:-"true"};
build "exporter";
build "backend"; if [ $build_enabled == "true" ]; then
build "frontend";
build "exporter";
build "backend";
fi
rm -rf ./bundle rm -rf ./bundle
mkdir -p ./bundle mkdir -p ./bundle
mv ./frontend/target/dist ./bundle/frontend cp -r ./frontend/target/dist ./bundle/frontend
mv ./backend/target/dist ./bundle/backend cp -r ./backend/target/dist ./bundle/backend
mv ./exporter/target ./bundle/exporter cp -r ./exporter/target ./bundle/exporter
local version="$CURRENT_VERSION"; local version="$CURRENT_VERSION";
local name="penpot-$CURRENT_BRANCH"; local name="penpot-$CURRENT_BRANCH";
@ -109,7 +113,7 @@ function build-bundle {
sed -i -re "s/\%version\%/$version/g" ./bundle/frontend/index.html; sed -i -re "s/\%version\%/$version/g" ./bundle/frontend/index.html;
sed -i -re "s/\%version\%/$version/g" ./bundle/backend/main/app/config.clj; sed -i -re "s/\%version\%/$version/g" ./bundle/backend/main/app/config.clj;
local generate_tar=${PENPOT_BUILD_GENERATE_TAR:-"true"}; local generate_tar=${PENPOT_BUNDLE_GENERATE_TAR:-"true"};
if [ $generate_tar == "true" ]; then if [ $generate_tar == "true" ]; then
pushd bundle/ pushd bundle/
tar -cvf ../$name.tar *; tar -cvf ../$name.tar *;