Skip to content

Commit 2bf2dd2

Browse files
committed
chore: update Makefile.
- renamed rules that starts with a dot. - fix master branch detection.
1 parent 73893a2 commit 2bf2dd2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: Makefile

+4-5
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,15 @@ docs: build-docs
7070
check-working-tree:
7171
@sh ./scripts/repo_status
7272

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

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

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

110-
pre-publish: clean .branch .version changelog
109+
pre-publish: clean branch version changelog
111110
pre-build: deps-project tests-ci build
112111

113112
publish: check-working-tree pre-publish pre-build publish-version publish-finished

0 commit comments

Comments
 (0)