fix ui bump version on mac

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This commit is contained in:
Augustin Husson 2022-12-24 18:30:11 +01:00
parent e1b7082008
commit 2ced3c78c0
No known key found for this signature in database
GPG Key ID: 99776005FB44BFC1
1 changed files with 8 additions and 3 deletions

View File

@ -75,12 +75,17 @@ function bumpVersion() {
if [[ "${version}" == v* ]]; then
version="${version:1}"
fi
# increase the version on all packages
npm version "${version}" --workspaces
# upgrade the @prometheus-io/* dependencies on all packages
for workspace in ${workspaces}; do
sed -E -i "s|(\"@prometheus-io/.+\": )\".+\"|\1\"\^${version}\"|" "${workspace}"/package.json
# sed -i syntax is different on mac and linux
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -E -i "" "s|(\"@prometheus-io/.+\": )\".+\"|\1\"${version}\"|" "${workspace}"/package.json
else
sed -E -i "s|(\"@prometheus-io/.+\": )\".+\"|\1\"${version}\"|" "${workspace}"/package.json
fi
done
# increase the version on all packages
npm version "${version}" --workspaces
}
if [[ "$1" == "--copy" ]]; then