Skip to content

Commit

Permalink
Check if git status is clean before releasing
Browse files Browse the repository at this point in the history
Fixes #2327
  • Loading branch information
marcelofabri committed Aug 4, 2018
1 parent d1ec738 commit e0adb6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ get_version:
@echo $(VERSION_STRING)

push_version:
ifneq ($(strip $(shell git status --untracked-files=no --porcelain 2>/dev/null)),)
$(error git state is not clean)
endif
$(eval NEW_VERSION_AND_NAME := $(filter-out $@,$(MAKECMDGOALS)))
$(eval NEW_VERSION := $(shell echo $(NEW_VERSION_AND_NAME) | sed 's/:.*//' ))
@sed -i '' 's/## Master/## $(NEW_VERSION_AND_NAME)/g' CHANGELOG.md
Expand Down

0 comments on commit e0adb6e

Please sign in to comment.