Skip to content

Commit bc2dded

Browse files
committed
Merge pull request #85
2 parents a818609 + 39fa9ed commit bc2dded

22 files changed

+2677
-2599
lines changed

Makefile.frag

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.PHONY: coverage testclean ChangeLog RELEASE package package.xml docs
22

33
DATE=`date +%Y-%m-%d--%H-%M-%S`
4-
MONGODB_VERSION=`php -n -dextension=modules/mongodb.so -r 'echo MONGODB_VERSION;'`
5-
MONGODB_STABILITY=`php -n -dextension=modules/mongodb.so -r 'echo MONGODB_STABILITY;'`
4+
MONGODB_VERSION=$(shell php -n -dextension=modules/mongodb.so -r 'echo MONGODB_VERSION;')
5+
MONGODB_MINOR=$(shell echo $(MONGODB_VERSION) | cut -d. -f1,2)
6+
MONGODB_STABILITY=$(shell php -n -dextension=modules/mongodb.so -r 'echo MONGODB_STABILITY;')
67
LIB_PATH=vendor/mongodb/mongodb
78
COMPOSER_ARGS=update --no-interaction --prefer-source
89
PHPUNIT_ARGS=--process-isolation
@@ -128,20 +129,25 @@ release: test distcheck
128129
@echo " " make release-docs
129130
@echo "And don't forget to bump version in php_phongo.h"
130131

131-
package: ChangeLog RELEASE package.xml
132+
package: ChangeLog package.xml
133+
@git checkout RELEASE-$(MONGODB_MINOR)
132134
pecl package package.xml
135+
@cat RELEASE-$(MONGODB_MINOR) >> RELEASE-$(MONGODB_VERSION)
136+
@mv RELEASE-$(MONGODB_VERSION) RELEASE-$(MONGODB_MINOR)
133137

134138
docs:
135139
mkdocs build --clean
136140

137141
release-docs: docs
138142
mkdocs gh-deploy --clean
139143

140-
package.xml:
144+
package.xml: RELEASE
141145
php bin/prep-release.php $(MONGODB_VERSION)-$(MONGODB_STABILITY)
142146

143147
RELEASE:
144-
@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_VERSION)
148+
@echo "RELEASE $(MONGODB_VERSION)" >> RELEASE-$(MONGODB_VERSION)
149+
@echo "-------------" >> RELEASE-$(MONGODB_VERSION)
150+
@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_VERSION)
145151

146152
ChangeLog:
147153
@git log --pretty=format:"%ad %an <%ae>%n%x09* %s%n" --date short > ChangeLog

0 commit comments

Comments
 (0)