From 9feaba7a45d3ae455958afcf28ae4d3e9898357a Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Mon, 14 Oct 2019 13:28:05 -0700 Subject: [PATCH] Prevent experimental promotion to stable Adds a check to the `prepare-stable` script to prevent experimental builds from being published using stable semver versions. --- scripts/release/prepare-stable.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/release/prepare-stable.js b/scripts/release/prepare-stable.js index 04d507fdadfee..ef03ee8c5b261 100755 --- a/scripts/release/prepare-stable.js +++ b/scripts/release/prepare-stable.js @@ -14,6 +14,7 @@ const printPrereleaseSummary = require('./shared-commands/print-prerelease-summa const testPackagingFixture = require('./shared-commands/test-packaging-fixture'); const testTracingFixture = require('./shared-commands/test-tracing-fixture'); const updateStableVersionNumbers = require('./prepare-stable-commands/update-stable-version-numbers'); +const theme = require('./theme'); const run = async () => { try { @@ -30,6 +31,13 @@ const run = async () => { params.version = await getLatestCanaryVersion(); } + if (params.version.includes('experimental')) { + console.error( + theme.error`Cannot promote an experimental build to stable.` + ); + process.exit(1); + } + await checkOutPackages(params); await guessStableVersionNumbers(params, versionsMap); await confirmStableVersionNumbers(params, versionsMap);