Skip to content

Remove make target for generating release notes from Git logs #367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ failed.txt

# Release files
!bin/*.php
ChangeLog
package.xml
phongo-*tgz
mongodb-*tgz

# Composer (for testing)
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ you must rebuild the extension after updating `php_phongo.h`.

### Publish PECL package

Create the PECL package with `make package`. This should generate a `Changelog`
file, which Git ignores, and add its contents to relevant `RELEASE-X.Y` file.
Additionally, the `package.xml` file will be created from a template and a
`mongodb-X.Y.Z.tgz` package file will be created.
Create the PECL package description file with `make package.xml`. This creates
a `package.xml` file from a template. Version, author, and file information will
be filled in, but release notes must be copied manually from JIRA.

Ensure that the generated PECL package can be successfully installed:
After copying release notes, use `make package` to create the package file (e.g.
`mongodb-X.Y.Z.tgz`) and ensure that it can be successfully installed:

```
$ pecl install -f mongodb-X.Y.Z.tgz
Expand All @@ -159,10 +159,10 @@ one chance to confirm the package information after uploading.

### Commit version update and release notes

Commit the modified `php_phongo.h` and `RELEASE-X.Y` files as "Package X.Y.Z"
Commit the modified `php_phongo.h` file as "Package X.Y.Z"

```
$ git add php_phongo.h RELEASE-X.Y
$ git add php_phongo.h
$ git commit -m "Package X.Y.Z"
```

Expand Down
36 changes: 5 additions & 31 deletions Makefile.frag
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: coverage testclean ChangeLog RELEASE package package.xml docs
.PHONY: coverage testclean package package.xml docs

DATE=`date +%Y-%m-%d--%H-%M-%S`
MONGODB_VERSION=$(shell php -n -dextension=modules/mongodb.so -r 'echo MONGODB_VERSION;')
Expand Down Expand Up @@ -29,11 +29,10 @@ help:
@echo ""
@echo -e "\t$$ make distcheck"
@echo -e "\t - Builds the archive, runs the virtual tests"
@echo ""
@echo -e "\t$$ make release"
@echo -e "\t - Packages the archive, runs the tests locally and virtual"

@echo ""
@echo -e "\t$$ make package.xml"
@echo -e "\t - Creates a package.xml file with empty release notes"
@echo -e "\t$$ make package"
@echo -e "\t - Creates the pecl archive to use for provisioning"
@echo -e "\t$$ make test-virtual"
Expand Down Expand Up @@ -112,44 +111,19 @@ testunit: composer

testall: composer test testunit


testclean:
@for group in generic standalone; do \
find $(top_srcdir)/tests/$$group -type f -name "*.diff" -o -name "*.exp" -o -name "*.log" -o -name "*.mem" -o -name "*.out" -o -name "*.php" -o -name "*.sh" | xargs rm -f; \
done;

mongodbdep:

release: test distcheck
@echo "Please run:"
@echo " " git add RELEASE-$(MONGODB_VERSION)
@echo " " git commit -m \"Add $(MONGODB_VERSION) release notes\"
@echo " " git tag -a -m \"Release $(MONGODB_VERSION)\" $(MONGODB_VERSION)
@echo " " git push --tags
@echo " " make release-docs
@echo "And don't forget to bump version in php_phongo.h"

package: ChangeLog package.xml
@git checkout RELEASE-$(MONGODB_MINOR)
package:
pecl package package.xml
@cat RELEASE-$(MONGODB_MINOR) >> RELEASE-$(MONGODB_VERSION)
@mv RELEASE-$(MONGODB_VERSION) RELEASE-$(MONGODB_MINOR)

docs:
mkdocs build --clean

release-docs: docs
mkdocs gh-deploy --clean

package.xml: RELEASE
package.xml:
php bin/prep-release.php $(MONGODB_VERSION) $(MONGODB_STABILITY)

RELEASE:
@echo "RELEASE $(MONGODB_VERSION)" >> RELEASE-$(MONGODB_VERSION)
@echo "-------------" >> RELEASE-$(MONGODB_VERSION)
@git log --pretty=format:"%ad %an <%ae>%n%x09* %s%n" --no-merges --date short --since="$$(git show -s --format=%ad `git rev-list --tags --max-count=1`)" >> RELEASE-$(MONGODB_VERSION)
@echo -e "\n" >> RELEASE-$(MONGODB_VERSION)

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

Loading