Skip to content

Commit 4b69478

Browse files
committed
[chore] clean publish resources before start...
* remove .branch and .version before publish.
1 parent 00ea6fe commit 4b69478

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Diff for: Makefile

+7-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ build-docs:
6868
@$(JQ) '.version' package.json | cut -d\" -f2 > .version
6969

7070
.branch:
71-
git branch | grep '^*' | awk '{ print $$2 }' > .branch
71+
@echo "[Release from branch]"
72+
@git branch | grep '^*' | awk '{ print $$2 }' > .branch
73+
@echo "Current branch: `cat .branch`"
7274

7375
release-commit:
7476
git commit --allow-empty -m "Release v`cat .version`."
@@ -83,10 +85,12 @@ publish-version: release-commit release-tag
8385
git push $(REMOTE) "`cat .branch`" "v`cat .version`"
8486
npm publish
8587

86-
publish-finished:
88+
publish-finished: clean
89+
90+
clean:
8791
@rm -rf .version .branch
8892

89-
pre-publish: .branch .version deps-project tests-ci build
93+
pre-publish: clean .branch .version deps-project tests-ci build
9094

9195
publish: pre-publish publish-version publish-finished
9296

0 commit comments

Comments
 (0)