Skip to content

Commit

Permalink
publish checks for uncommitted/untracked changes
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Dec 4, 2021
1 parent 86974fb commit 5f43033
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@ platform-deno: esbuild lib-typecheck | scripts/node_modules
test-otp:
test -n "$(OTP)" && echo publish --otp="$(OTP)"

publish-all: cmd/esbuild/version.go test-prepublish
@test master = "`git rev-parse --abbrev-ref HEAD`" || (echo "Refusing to publish from non-master branch `git rev-parse --abbrev-ref HEAD`" && false)
publish-all: platform-all
@echo "Checking for uncommitted/untracked changes..." && test -z "`git status --porcelain`" || (echo "Refusing to publish with uncommitted/untracked changes" && false)
@echo "Checking for master branch..." && test master = "`git rev-parse --abbrev-ref HEAD`" || (echo "Refusing to publish from non-master branch `git rev-parse --abbrev-ref HEAD`" && false)
@echo "Checking for unpushed commits..." && git fetch
@test "" = "`git cherry`" || (echo "Refusing to publish with unpushed commits" && false)
rm -fr npm && git checkout npm
Expand Down

0 comments on commit 5f43033

Please sign in to comment.