Skip to content

Commit

Permalink
Prepare for 1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Nov 21, 2016
1 parent da72855 commit 5712790
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 35 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

1.1.3 (2016-11-21)
------------------

* Suggest relevant extensions when installing with Composer. GitHub #37.

1.1.2 (2016-10-05)
------------------

Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"require": {
"php": ">=5.3.1"
},
"suggest": {
"ext-bcmath": "bcmath or gmp is requred for decoding larger integers with the pure PHP decoder",
"ext-gmp": "bcmath or gmp is requred for decoding larger integers with the pure PHP decoder",
"ext-maxminddb": "A C-based database decoder that provides significantly faster lookups"
},
"require-dev": {
"phpunit/phpunit": "4.2.*",
"satooshi/php-coveralls": "1.0.*",
Expand Down
35 changes: 0 additions & 35 deletions dev-bin/make-release.sh

This file was deleted.

70 changes: 70 additions & 0 deletions dev-bin/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/bash

set -eu -o pipefail

changelog=$(cat CHANGELOG.md)

regex='
([0-9]+\.[0-9]+\.[0-9]+) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
-*
((.|
)*)
'

if [[ ! $changelog =~ $regex ]]; then
echo "Could not find date line in change log!"
exit 1
fi

version="${BASH_REMATCH[1]}"
date="${BASH_REMATCH[2]}"
notes="$(echo "${BASH_REMATCH[3]}" | sed -n -e '/^[0-9]\+\.[0-9]\+\.[0-9]\+/,$!p')"

if [[ "$date" -ne $(date +"%Y-%m-%d") ]]; then
echo "$date is not today!"
exit 1
fi

tag="v$version"

rm -fr vendor

perl -pi -e "s/(?<=#define PHP_MAXMINDDB_VERSION \")\d+\.\d+\.\d+(?=\")/$version/" ext/php_maxminddb.h

php composer.phar update

./vendor/bin/phpunit

php composer.phar self-update
php composer.phar update --no-dev


echo $'\nDiff:'
git diff

if [ -n "$(git status --porcelain)" ]; then
git commit -m "Bumped version to $version" -a
fi

echo $'\nRelease notes:'
echo "$notes"


read -p "Push to origin? (y/n) " SHOULD_PUSH

if [ "$SHOULD_PUSH" != "y" ]; then
echo "Aborting"
exit 1
fi

echo "Creating tag $tag"

message="$version
$notes"

hub release create -m "$message" "$tag"

git push
git push --tags

0 comments on commit 5712790

Please sign in to comment.