Skip to content

Commit 6bb143c

Browse files
committed
Use dynamic release/VERSION make target
1 parent 264a911 commit 6bb143c

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

Makefile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.PHONY: apigen composer test docs mkdocs
22

3-
MONGODB_LIB_VERSION=`php -r 'require "src/Collection.php"; echo MongoDB\Collection::VERSION, "\n";'`
43
COMPOSER_ARGS=update --no-interaction --prefer-source
54
PHPUNIT_ARGS=--process-isolation
65

@@ -54,22 +53,19 @@ docs-api: apigen
5453

5554
docs: mkdocs
5655

57-
58-
release: test RELEASE
56+
release/%: release-log/%
5957
@echo "Please run:"
60-
@echo " " git add RELEASE-$(MONGODB_LIB_VERSION)
61-
@echo " " git commit -m \"Add $(MONGODB_LIB_VERSION) release notes\"
62-
@echo " " git tag -a -m \"Release MongoDB library $(MONGODB_LIB_VERSION)\" $(MONGODB_LIB_VERSION)
63-
@echo " " git push --tags
64-
@echo " " make release-docs
65-
@echo "And don't forget to bump version in src/Collection.php"
58+
@echo " " git add RELEASE-$(*)
59+
@echo " " git commit -m \"Add $(*) release notes\"
60+
@echo " " git tag -a -m \"Release MongoDB library $(*)\" $(*)
61+
@echo " " git push --tags
62+
@echo " " make release-docs
6663

6764
docs:
6865
mkdocs build --clean
6966

7067
release-docs: docs
7168
mkdocs gh-deploy --clean
7269

73-
RELEASE:
74-
@git log --pretty=format:"%ad %an <%ae>%n%x09* %s%n" --date short --since="$$(git show -s --format=%ad `git rev-list --tags --max-count=1`)" > RELEASE-$(MONGODB_LIB_VERSION)
75-
70+
release-log/%:
71+
@git log --pretty=format:"%ad %an <%ae>%n%x09* %s%n" --date short --since="$$(git show -s --format=%ad `git rev-list --tags --max-count=1`)" > RELEASE-$(*)

0 commit comments

Comments
 (0)