From 796c393d3f942a73a14406f4346fbbd054d7facb Mon Sep 17 00:00:00 2001 From: "Dennis J. Bell" Date: Mon, 7 Oct 2024 22:50:18 -0700 Subject: [PATCH] Set the version before building the UI, fix release path --- bin/package | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/package b/bin/package index 16d74ac9c..216465b00 100755 --- a/bin/package +++ b/bin/package @@ -99,6 +99,9 @@ build_dir="${work_dir}/stratos-ui" # prebuild ui cd stratos-ui +if [[ -n "${stratos_version:-""}" ]]; then + sed -i package.json -e 's/"version": .*/"version": "'"$stratos_version"'"/' +fi npm install npm run prebuild-ui rm -Rf ./dist @@ -122,7 +125,7 @@ ls -lah "${build_dir}" cd "${build_dir}" package_version="${stratos_version:-"dev-$(date +%Y%m%d%H%M%S)"}" if [[ -n ${RELEASE_DIR:-""} ]] ; then - zip -r -x@exclude.lst "${RELEASE_DIR}/stratos-ui-${package_version}.zip" ./* + zip -r -x@exclude.lst "${work_dir}/${RELEASE_DIR}/stratos-ui-${package_version}.zip" ./* else zip -r -x@exclude.lst "${work_dir}/stratos-ui-${package_version}.zip" ./* fi