chore: add branch check in release script (@fehmer) (#6338)

This commit is contained in:
Christian Fehmer 2025-03-06 01:31:33 +01:00 committed by GitHub
parent 25dada50eb
commit 9e13f2452a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,6 +55,15 @@ const runProjectRootCommand = (command, force) => {
};
const checkBranchSync = () => {
console.log("Checking if local branch is master...");
const currentBranch = runProjectRootCommand("git branch --show-current");
if (currentBranch !== "master") {
console.error(
"Local branch is not master. Please checkout the master branch."
);
process.exit(1);
}
console.log("Checking if local master branch is in sync with origin...");
if (noSyncCheck) {