diff --git a/packages/release/src/index.js b/packages/release/src/index.js index 098951552..b8892d8fe 100755 --- a/packages/release/src/index.js +++ b/packages/release/src/index.js @@ -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) {