Skip to content

Commit

Permalink
Prevent experimental promotion to stable
Browse files Browse the repository at this point in the history
Adds a check to the `prepare-stable` script to prevent experimental
builds from being published using stable semver versions.
  • Loading branch information
acdlite committed Oct 14, 2019
1 parent cec646f commit 9feaba7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/release/prepare-stable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
Expand Down

0 comments on commit 9feaba7

Please sign in to comment.