From 20b82697669f4fec1e1aeb916423e07332068755 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 17 May 2021 15:57:10 +0200 Subject: [PATCH] :sparkles: Improve bundle generation scripts. --- manage.sh | 72 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/manage.sh b/manage.sh index 6ea162e26..80d9c6a85 100755 --- a/manage.sh +++ b/manage.sh @@ -98,6 +98,54 @@ Copyright (c) UXBOX Labs SL EOF } +function build-frontend-bundle { + echo ">> bundle frontend start"; + + local version=$(print-current-version); + local bundle_dir="./bundle-frontend"; + + build "frontend"; + + rm -rf $bundle_dir; + mv ./frontend/target/dist $bundle_dir; + echo $version > $bundle_dir/version.txt; + put-license-file $bundle_dir; + echo ">> bundle frontend end"; +} + +function build-backend-bundle { + echo ">> bundle backend start"; + + local version=$(print-current-version); + local bundle_dir="./bundle-backend"; + + build "backend"; + + rm -rf $bundle_dir; + mv ./backend/target/dist $bundle_dir; + echo $version > $bundle_dir/version.txt; + put-license-file $bundle_dir; + echo ">> bundle frontend end"; +} + +function build-exporter-bundle { + echo ">> bundle exporter start"; + local version=$(print-current-version); + local bundle_dir="./bundle-exporter"; + + build "exporter"; + + rm -rf $bundle_dir; + mv ./exporter/target $bundle_dir; + + echo $version > $bundle_dir/version.txt + put-license-file $bundle_dir; + + echo ">> bundle exporter end"; +} + +# DEPRECATED: temporary mantained for backward compatibilty. + function build-app-bundle { echo ">> bundle app start"; @@ -117,22 +165,6 @@ function build-app-bundle { echo ">> bundle app end"; } -function build-exporter-bundle { - echo ">> bundle exporter start"; - local version=$(print-current-version); - local bundle_dir="./bundle-exporter"; - - build "exporter"; - - rm -rf $bundle_dir; - mv ./exporter/target $bundle_dir; - - echo $version > $bundle_dir/version.txt - put-license-file $bundle_dir; - - echo ">> bundle exporter end"; -} - function usage { echo "PENPOT build & release manager" echo "USAGE: $0 OPTION" @@ -182,6 +214,14 @@ case $1 in build-app-bundle; ;; + build-frontend-bundle) + build-frontend-bundle; + ;; + + build-backend-bundle) + build-backend-bundle; + ;; + build-exporter-bundle) build-exporter-bundle; ;;