Skip to content

Fix bug in docs CI #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/update-docs-branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if (pkgVersion.includes('-') && !pkgVersion.includes('.0.0-')) {

const current = match.groups;
const major = current?.major ?? pkgVersion.split('.')[0];
const minor = current?.minor ?? pkgVersion.split('.')[1];
const docsBranch = `docs-v${major}.x`;

// Fetch remotes and find the docs branch if it exists
Expand All @@ -53,7 +54,7 @@ if (!matchingDocsBranches) {
}
const publishedVersion = JSON.parse(read(`git show ${publishedRef}:package.json`)).version;
const publishedMinor = publishedVersion.match(/\d+\.(?<minor>\d+)\.\d+/).groups.minor;
if (major < publishedMinor) {
if (minor < publishedMinor) {
console.error('Refusing to update docs: newer version is published');
process.exit(0);
}
Expand Down