Skip to content

Commit

Permalink
Fix docs updates on prereleases
Browse files Browse the repository at this point in the history
(cherry picked from commit f0316a4)
  • Loading branch information
frangio committed Sep 19, 2023
1 parent 9aaca67 commit 33894d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/update-docs-branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ if (!match) {
process.exit(1);
}

const pkgVersion = require('../package.json').version;

if (pkgVersion.includes('-') && !pkgVersion.includes('.0.0-')) {
console.error('Refusing to update docs: non-major prerelease detected');
process.exit(0);
}

const current = match.groups;
const docsBranch = `docs-v${current.major}.x`;

Expand Down

0 comments on commit 33894d2

Please sign in to comment.