mirror of
https://github.com/primer/css.git
synced 2024-11-30 11:17:05 +03:00
possible fix for #263
This commit is contained in:
parent
d0d0e7d506
commit
43724fddb9
@ -8,10 +8,6 @@ package=primer-css
|
||||
npm_tag=rc
|
||||
log=/tmp/rc.log
|
||||
|
||||
function bump() {
|
||||
npm version --no-git $@
|
||||
}
|
||||
|
||||
# get the version we're publishing as a release candidate
|
||||
local_version=$(jq -r .version modules/$package/package.json)
|
||||
if [[ $local_version =~ "-" ]]; then
|
||||
@ -25,6 +21,9 @@ fi
|
||||
rc_version=$(npm info $package@$npm_tag version)
|
||||
echo "📦 Published version for $package@$npm_tag: $rc_version"
|
||||
rc_release=${rc_version%-*}
|
||||
if [[ $local_version != $rc_release ]]; then
|
||||
rc_version=$local_version
|
||||
fi
|
||||
|
||||
# determine the
|
||||
next_version=$(
|
||||
@ -47,12 +46,14 @@ for module_dir in $module_dirs; do
|
||||
|
||||
# determine the local version (in git)
|
||||
module_version=$(jq -r .version package.json)
|
||||
# strip the rc version, just in case
|
||||
module_version=${module_version%-*}
|
||||
module_next_version="$module_version$pre_version"
|
||||
|
||||
echo "$module@$module_version => $module_next_version"
|
||||
# "upgrade" to the most recent RC version so that
|
||||
# `npm version prerelease` can increment automatically
|
||||
bump --quiet "$module_next_version" >> $log
|
||||
npm version --no-git --quiet "$module_next_version" >> $log
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user