Skip to content

Commit 58f6a8f

Browse files
committed
nicer output
1 parent a11cdd0 commit 58f6a8f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

script/bump-rc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ package="$1"
55
npm_tag=rc
66
semver=$(npm bin)/semver
77

8+
bold=$(tput bold)
9+
normal=$(tput sgr0)
10+
811
pushd modules/$package > /dev/null
912

1013
# get the version we're publishing as a release candidate
1114
local_version=$(jq -r .version package.json)
15+
echo "Bumping $package@${local_version}"
1216
if [[ $local_version =~ "-" ]]; then
1317
echo "❌ Found pre-release version: $package@$local_version; bailing!"
1418
exit 1
15-
else
16-
echo "Local version: $package@$local_version"
1719
fi
1820

1921
# find the *greatest* published prerelease
@@ -27,16 +29,17 @@ rc_version=$(
2729
)
2830
# if there isn't one, use the current local version
2931
if [[ "$rc_version" == "" ]]; then
32+
echo " 🤷‍♀️ no published RC; using ${bold}${local_version}${normal}"
3033
rc_version=$local_version
34+
else
35+
echo " 📰 published RC: ${bold}${rc_version}${normal}"
3136
fi
3237

33-
echo "RC version: $rc_version"
34-
3538
# increment by the tagged prerelease id
3639
next_version=$(
37-
$semver --increment prerelease --preid="$npm_tag" "$rc_version"
40+
$semver -i prerelease --preid $npm_tag "$rc_version"
3841
)
3942

40-
echo "next RC version: $rc_version"
41-
npm version --no-git "$next_version"
43+
bumped=$(npm version --no-git "$next_version")
44+
echo " ➡️ ${bold}${bumped}${normal}"
4245
popd > /dev/null

0 commit comments

Comments
 (0)