From 75e8ca4045bb4d936a77d5395b5049161f89faf9 Mon Sep 17 00:00:00 2001 From: Radhep Sabapathipillai <34665674+RadhepS@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:38:32 -0400 Subject: [PATCH] chore: optimize release script to avoid timeouts (#19006) closes: https://jira.tools.sap/browse/CXSPA-7607 --- .npmignore | 1 + ci-scripts/release-packer.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.npmignore b/.npmignore index 3ba6feeee01..b7599e66bb7 100644 --- a/.npmignore +++ b/.npmignore @@ -2,3 +2,4 @@ sonar-project.properties sub-folder/ .pipeline/ +tmp/** diff --git a/ci-scripts/release-packer.sh b/ci-scripts/release-packer.sh index 690df6b02f4..17583a51e24 100755 --- a/ci-scripts/release-packer.sh +++ b/ci-scripts/release-packer.sh @@ -5,12 +5,15 @@ set -e shopt -s extglob dotglob +# Build all the libraries and generate the dist folders to use when releasing +function build_libs { + npm ci && npm run build:libs +} + # Configure the project to move everything into a sub-folder to keep root clean for publishing function configure_project { mkdir sub-folder mv !(sub-folder) sub-folder - cd sub-folder - npm ci && npm run build:libs } # Clear root containing the old package so the next package can be published @@ -49,6 +52,8 @@ function pack { if [[ $1 == 'configure' ]]; then configure_project +elif [[ $1 == 'build' ]]; then + build_libs else clear_root pack "$1"