From 7e32b13e369e1ab684b72fb4e57c09b4680d148d Mon Sep 17 00:00:00 2001 From: F-OBrien Date: Tue, 27 Aug 2024 14:39:38 +0100 Subject: [PATCH] fix: update bump-versions.sh to work with yarn@4.4.0 --- .github/bump-versions.sh | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/bump-versions.sh b/.github/bump-versions.sh index f5d77094..a65a00a7 100755 --- a/.github/bump-versions.sh +++ b/.github/bump-versions.sh @@ -1,12 +1,28 @@ +#!/bin/bash + +# Exit immediately if a command exits with a non-zero status +set -e + +# Check if a version argument is provided +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +VERSION=${1} + +echo "Updating to version $VERSION" + git pull -yarn workspace @polymeshassociation/extension-core version --no-git-tag-version --no-commit-hooks --new-version ${1} -yarn workspace @polymeshassociation/extension-ui version --no-git-tag-version --no-commit-hooks --new-version ${1} -yarn workspace @polymeshassociation/extension version --no-git-tag-version --no-commit-hooks --new-version ${1} -yarn workspace @polymeshassociation/extension add @polymeshassociation/extension-core@${1} @polymeshassociation/extension-ui@${1} +yarn workspace @polymeshassociation/extension-core version "$VERSION" +yarn workspace @polymeshassociation/extension-ui version "$VERSION" +yarn workspace @polymeshassociation/extension version "$VERSION" + +yarn workspace @polymeshassociation/extension add @polymeshassociation/extension-core@"$VERSION" @polymeshassociation/extension-ui@"$VERSION" yarn build git add -A -git commit -m "chore(release): update package versions to ${1} [skip ci]" -git push \ No newline at end of file +git commit -m "chore(release): update package versions to $VERSION [skip ci]" +git push