1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 11:17:05 +03:00

Merge pull request #275 from primer/release-ci-fixes

Release CI fixes
This commit is contained in:
Shawn Allen 2017-07-25 11:39:21 -07:00 committed by GitHub
commit ca75293b48

View File

@ -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,15 +46,17 @@ 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
# publish all the things!
lerna exec --bail -- npm publish --tag=$npm_tag
lerna exec --bail=false -- npm publish --tag=$npm_tag