0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

📎 Update manage.sh

This commit is contained in:
Andrey Antukh 2022-10-04 15:14:02 +02:00
parent 50af997f55
commit c53152f027

View file

@ -12,11 +12,7 @@ export CURRENT_HASH=$(git rev-parse --short HEAD);
export CURRENT_COMMITS=$(git rev-list --count HEAD)
function print-current-version {
if [ $CURRENT_BRANCH != "main" ]; then
echo -n "$CURRENT_BRANCH-$CURRENT_VERSION-$CURRENT_COMMITS-g$CURRENT_HASH"
else
echo -n "$CURRENT_VERSION-$CURRENT_COMMITS-g$CURRENT_HASH"
fi
echo -n "$CURRENT_VERSION-$CURRENT_COMMITS-g$CURRENT_HASH"
}
function build-devenv {
@ -114,15 +110,16 @@ This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (c) UXBOX Labs SL
Copyright (c) KALEIDOS INC
EOF
}
function build-frontend-bundle {
echo ">> bundle frontend start";
mkdir -p ./bundles
local version=$(print-current-version);
local bundle_dir="./bundle-frontend";
local bundle_dir="./bundles/frontend";
build "frontend";
@ -136,8 +133,9 @@ function build-frontend-bundle {
function build-backend-bundle {
echo ">> bundle backend start";
mkdir -p ./bundles
local version=$(print-current-version);
local bundle_dir="./bundle-backend";
local bundle_dir="./bundles/backend";
build "backend";
@ -150,8 +148,10 @@ function build-backend-bundle {
function build-exporter-bundle {
echo ">> bundle exporter start";
mkdir -p ./bundles
local version=$(print-current-version);
local bundle_dir="./bundle-exporter";
local bundle_dir="./bundles/exporter";
build "exporter";
@ -164,27 +164,6 @@ function build-exporter-bundle {
echo ">> bundle exporter end";
}
# DEPRECATED: temporary maintained for backward compatibility.
function build-app-bundle {
echo ">> bundle app start";
local version=$(print-current-version);
local bundle_dir="./bundle-app";
build "frontend";
build "backend";
rm -rf $bundle_dir
mkdir -p $bundle_dir;
mv ./frontend/target/dist $bundle_dir/frontend;
mv ./backend/target/dist $bundle_dir/backend;
echo $version > $bundle_dir/version.txt
put-license-file $bundle_dir;
echo ">> bundle app end";
}
function usage {
echo "PENPOT build & release manager"
echo "USAGE: $0 OPTION"
@ -237,10 +216,6 @@ case $1 in
;;
# production builds
build-app-bundle)
build-app-bundle;
;;
build-frontend-bundle)
build-frontend-bundle;
;;