Skip to content

Commit bb76272

Browse files
committed
fixed: rules' execution order.
1 parent 83c8c23 commit bb76272

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Diff for: Makefile

+11-6
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ check-working-tree:
7777
@[ -z "`git status -s`" ] && \
7878
echo "Stopping publish. There are change to commit or discard." || echo "Worktree is clean."
7979

80-
changelog:
81-
@echo "[Updating CHANGELOG.md $(CURRENT_VERSION) > $(VERSION)]"
82-
python ./scripts/changelog.py -a $(VERSION) > CHANGELOG.md
83-
8480
compile:
8581
@echo "[Compiling source]"
8682
$(BABEL) src --out-dir lib
@@ -89,8 +85,17 @@ build: compile
8985
@echo "[Building dists]"
9086
@npx webpack --config ./scripts/webpack.dist.config.js
9187

92-
release-commit:
88+
pre-release-commit:
9389
git commit --allow-empty -m "Release v$(VERSION)."
90+
91+
changelog:
92+
@echo "[Updating CHANGELOG.md $(CURRENT_VERSION) > $(VERSION)]"
93+
python ./scripts/changelog.py -a $(VERSION) > CHANGELOG.md
94+
95+
update-package-version:
96+
@cat package.json | jq '.version=$(VERSION)' > tmp; mv -f tmp package.json
97+
98+
release-commit: pre-release-commit update-package-version changelog
9499
@git add .
95100
@git commit --amend -m "`git log -1 --format=%s`"
96101

@@ -102,7 +107,7 @@ publish-version: release-commit release-tag
102107
git push $(REMOTE) "$(BRANCH)" "v$(VERSION)"
103108
npm publish
104109

105-
pre-publish: clean changelog
110+
pre-publish: clean
106111
pre-build: deps-project tests-single-run build
107112

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

0 commit comments

Comments
 (0)