From 2ced3c78c011c681715e824803d6c9cce9c64db1 Mon Sep 17 00:00:00 2001 From: Augustin Husson Date: Sat, 24 Dec 2022 18:30:11 +0100 Subject: [PATCH] fix ui bump version on mac Signed-off-by: Augustin Husson --- scripts/ui_release.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/ui_release.sh b/scripts/ui_release.sh index 3693cc718..9f9ad3eda 100755 --- a/scripts/ui_release.sh +++ b/scripts/ui_release.sh @@ -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