From f27d03a6bc130a0b18c361ac57a5e1701e6701e4 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 14 Feb 2020 10:46:28 +0000 Subject: [PATCH] Always publish to `next` tag This ensures that anyone who wants the latest version (pre-release or final release) can always use the `next` tag. --- release.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/release.sh b/release.sh index a52fb9eb6..1ed300cd1 100755 --- a/release.sh +++ b/release.sh @@ -294,14 +294,15 @@ fi rm "${release_text}" rm "${latest_changes}" -npm_publish_flags='' -if [ $prerelease -eq 1 ]; then - # Tag prereleases as `next` so the last stable release remains the default - npm_publish_flags='--tag next' -fi # Login and publish continues to use `npm`, as it seems to have more clearly # defined options and semantics than `yarn` for writing to the registry. -npm publish $npm_publish_flags +# Tag both releases and prereleases as `next` so the last stable release remains +# the default. +npm publish --tag next +if [ $prerelease -eq 0 ]; then + # For a release, also publish to the default `latest` tag. + npm publish +fi if [ -z "$skip_jsdoc" ]; then echo "generating jsdocs"