Skip to content

Commit

Permalink
Adapt update-docs-branch to publish docs from master
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestognw committed Nov 29, 2024
1 parent 7c14c70 commit bf7226d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/update-docs-branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ const tryRead = cmd => {
}
};

const releaseBranchRegex = /^release-v(?<version>(?<major>\d+)\.(?<minor>\d+)(?:\.(?<patch>\d+))?)$/;
// The community contracts currently don't have a defined release process.
// The master branch is used for development, and the docs are updated from there.
const masterBranch = /^master$/;

const currentBranch = read('git rev-parse --abbrev-ref HEAD');
const match = currentBranch.match(releaseBranchRegex);
const match = currentBranch.match(masterBranch);

if (!match) {
console.error('Not currently on a release branch');
console.error('Not currently on master branch');
process.exit(1);
}

Expand Down

0 comments on commit bf7226d

Please sign in to comment.