mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
📎 Update manage.sh
This commit is contained in:
parent
50af997f55
commit
c53152f027
1 changed files with 9 additions and 34 deletions
41
manage.sh
41
manage.sh
|
@ -12,11 +12,7 @@ export CURRENT_HASH=$(git rev-parse --short HEAD);
|
||||||
export CURRENT_COMMITS=$(git rev-list --count HEAD)
|
export CURRENT_COMMITS=$(git rev-list --count HEAD)
|
||||||
|
|
||||||
function print-current-version {
|
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"
|
echo -n "$CURRENT_VERSION-$CURRENT_COMMITS-g$CURRENT_HASH"
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-devenv {
|
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
|
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/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
Copyright (c) UXBOX Labs SL
|
Copyright (c) KALEIDOS INC
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-frontend-bundle {
|
function build-frontend-bundle {
|
||||||
echo ">> bundle frontend start";
|
echo ">> bundle frontend start";
|
||||||
|
|
||||||
|
mkdir -p ./bundles
|
||||||
local version=$(print-current-version);
|
local version=$(print-current-version);
|
||||||
local bundle_dir="./bundle-frontend";
|
local bundle_dir="./bundles/frontend";
|
||||||
|
|
||||||
build "frontend";
|
build "frontend";
|
||||||
|
|
||||||
|
@ -136,8 +133,9 @@ function build-frontend-bundle {
|
||||||
function build-backend-bundle {
|
function build-backend-bundle {
|
||||||
echo ">> bundle backend start";
|
echo ">> bundle backend start";
|
||||||
|
|
||||||
|
mkdir -p ./bundles
|
||||||
local version=$(print-current-version);
|
local version=$(print-current-version);
|
||||||
local bundle_dir="./bundle-backend";
|
local bundle_dir="./bundles/backend";
|
||||||
|
|
||||||
build "backend";
|
build "backend";
|
||||||
|
|
||||||
|
@ -150,8 +148,10 @@ function build-backend-bundle {
|
||||||
|
|
||||||
function build-exporter-bundle {
|
function build-exporter-bundle {
|
||||||
echo ">> bundle exporter start";
|
echo ">> bundle exporter start";
|
||||||
|
|
||||||
|
mkdir -p ./bundles
|
||||||
local version=$(print-current-version);
|
local version=$(print-current-version);
|
||||||
local bundle_dir="./bundle-exporter";
|
local bundle_dir="./bundles/exporter";
|
||||||
|
|
||||||
build "exporter";
|
build "exporter";
|
||||||
|
|
||||||
|
@ -164,27 +164,6 @@ function build-exporter-bundle {
|
||||||
echo ">> bundle exporter end";
|
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 {
|
function usage {
|
||||||
echo "PENPOT build & release manager"
|
echo "PENPOT build & release manager"
|
||||||
echo "USAGE: $0 OPTION"
|
echo "USAGE: $0 OPTION"
|
||||||
|
@ -237,10 +216,6 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# production builds
|
# production builds
|
||||||
build-app-bundle)
|
|
||||||
build-app-bundle;
|
|
||||||
;;
|
|
||||||
|
|
||||||
build-frontend-bundle)
|
build-frontend-bundle)
|
||||||
build-frontend-bundle;
|
build-frontend-bundle;
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue