From 5c9e98599978ef71ea3e2bf7417ce613faab0259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Wed, 27 Dec 2017 19:55:38 -0500 Subject: [PATCH] Separate and improve wording for `pre` and `rc` pre-release versions --- scripts/changelog.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/changelog.js b/scripts/changelog.js index 32c95ab6..7a33f323 100644 --- a/scripts/changelog.js +++ b/scripts/changelog.js @@ -93,7 +93,14 @@ function prereleaseTemplate(items) { [See the full changelog](${items.fullChangelogUrl}) -This is a release candidate for v${stableVersion(items.version)} to ensure maximum stability for public release. +${prereleaseType(items.version) === "rc" ? + `This is a release candidate (RC) for v${stableVersion(items.version)} to ensure maximum stability for public release. +Bugs may be fixed, but no further features will be added until the next stable version.` : + + `This is a pre-release for v${stableVersion(items.version)} to offer latest changes without having to wait for a stable release. + At this stage, features may still be added or modified until the first release candidate for this version gets released.` +} + Please refer to the commit list given above for a complete list of changes, or wait for the stable release to get a thoroughly prepared change log entry. As with all pre-releases, this version requires explicit use of the \`next\` tag to be installed: @@ -170,6 +177,11 @@ function isPrerelease(v) { return v.includes("-"); } +// Given a version of `x.y.z-abc.n`, returns `abc`, i.e. the type of pre-release +function prereleaseType(v) { + return semver.prerelease(v)[0]; +} + // Returns the stable version that this pre-release version is targeting. For // example, if new version is 2.5.0-rc.2, next stable version will be 2.5.0. function stableVersion(prereleaseVersion) {