Skip to content

Commit d4c63b7

Browse files
committed
maint: Makefile: Define targets as phony, if they are.
1 parent 7202edf commit d4c63b7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ stamp-yarn install:
2626
touch stamp-yarn
2727

2828

29+
.PHONY: clean
2930
clean-dist:
3031
rm -Rf dist/
3132

@@ -46,6 +47,7 @@ check: stamp-yarn eslint
4647
$(YARN) run test
4748

4849

50+
.PHONY: bundle-pre
4951
bundle-pre:
5052
@# Override this in your project to add some tasks before the bundle is built.
5153
@# Example: Unlink any linked dependencies.
@@ -66,6 +68,7 @@ endif
6668

6769

6870
# Create a ZIP file from the bundle which is uploaded to the GitHub release tag.
71+
.PHONY: release-zip
6972
release-zip:
7073
ifneq "$(PACKAGE_NAME)" "$(PACKAGE_DEV)"
7174
@# Do not create a zip release for @patternslib/dev
@@ -79,6 +82,7 @@ endif
7982

8083

8184
# Prepare some necessary variables.
85+
.PHONY: prepare-release
8286
prepare-release:
8387
ifeq ($(LEVEL),$(filter $(LEVEL), alpha beta))
8488
@# case alpha or beta pre-release
@@ -104,11 +108,13 @@ endif
104108

105109

106110
# Do the npm release.
111+
.PHONY: release-npm
107112
release-npm: prepare-release
108113
npx release-it $(RELEASE_IT_LEVEL)
109114

110115

111116
# Do the GitHub release.
117+
.PHONY: release-github
112118
release-github: prepare-release release-zip
113119
@# NOTE: PACKAGE_VERSION is defined in release-zip
114120

@@ -130,6 +136,7 @@ release-github: prepare-release release-zip
130136
-rm $(BUNDLE_NAME)-bundle-$(PACKAGE_VERSION).zip
131137

132138

139+
.PHONY: release
133140
release: clean install check release-npm release-github
134141
@# Note: If you want to include the compiled bundle in your npm package you
135142
@# have to allow it in a .npmignore file.

0 commit comments

Comments
 (0)