File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 3232 "check" : " npm run format:check && npm run lint && npm t" ,
3333 "build" : " npm run check && npm run bundle && npm run minify" ,
3434 "prepare" : " npm run build" ,
35- "release" : " npm run clean && npm i && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
35+ "release" : " ./pre-flight-tests && npm run clean && npm i && git tag $npm_package_version && git push && git push --tags && npm publish"
3636 },
3737 "prettier" : {
3838 "semi" : false
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+
3+ // eslint-disable-next-line no-undef
4+ const { execSync } = require ( "child_process" )
5+ const exec = command => execSync ( command , { encoding : "utf8" } )
6+
7+ const gitBranchName = exec ( "git rev-parse --abbrev-ref HEAD" )
8+ if ( gitBranchName . trim ( ) !== "master" ) {
9+ throw new Error ( "please checkout the master branch to make a release!" )
10+ }
11+
12+ const workingCopyChanges = exec ( "git status --porcelain" )
13+ if ( workingCopyChanges . trim ( ) !== "" ) {
14+ throw new Error ( "please commit your changes before making a release!" )
15+ }
You can’t perform that action at this time.
0 commit comments