Skip to content

Commit

Permalink
chore: update Makefile.
Browse files Browse the repository at this point in the history
- renamed rules that starts with a dot.
- fix master branch detection.
  • Loading branch information
diasbruno committed Jun 1, 2018
1 parent 73893a2 commit 2bf2dd2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,15 @@ docs: build-docs
check-working-tree:
@sh ./scripts/repo_status

.version:
version:
@echo "[Updating react-modal version]"
@sh ./scripts/version $(CURRENT_VERSION)
@$(JQ) '.version' package.json | cut -d\" -f2 > .version

.branch:
branch:
@echo "[Release from branch]"
@git branch | grep '^*' | awk '{ print $$2 }' > .branch
@[[ "`git branch | awk '{ print $$2 }'`" != "master" ]] && echo "Fail. Current branch is not master." && exit 1
@echo "Current branch: `cat .branch`"
@[[ "`cat .branch`" != "master\n" ]] && echo "Current branch: `cat .branch`" || (echo "Fail. Current branch is not master." && exit 1)

changelog:
@echo "[Updating CHANGELOG.md $(CURRENT_VERSION) > `cat .version`]"
Expand Down Expand Up @@ -107,7 +106,7 @@ publish-version: release-commit release-tag
git push $(REMOTE) "`cat .branch`" "v`cat .version`"
npm publish

pre-publish: clean .branch .version changelog
pre-publish: clean branch version changelog
pre-build: deps-project tests-ci build

publish: check-working-tree pre-publish pre-build publish-version publish-finished
Expand Down

0 comments on commit 2bf2dd2

Please sign in to comment.