Skip to content
This repository has been archived by the owner on Jun 29, 2019. It is now read-only.

Commit

Permalink
Better output of make-release script, add automatic branching and tag…
Browse files Browse the repository at this point in the history
…ging
  • Loading branch information
CHH committed Dec 4, 2012
1 parent 372acc9 commit cbf2467
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions make-release.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,46 @@
#!/usr/bin/env bash

set -e

VERSION="$1"

if [ -z "$VERSION" ]; then
echo "make-release.sh: No Version given." >&2
exit 1
fi

./build-docs.sh "$VERSION"
echo "Releasing $VERSION"
echo "==="
echo

echo "--> Creating release branch... "

{
git branch "release/$VERSION" master
git checkout "release/$VERSION"
} > /dev/null

echo "Done"

echo "---> Building documentation... "
./build-docs.sh "$VERSION" > /dev/null
echo "Done"

echo "---> Updating version number to \"$VERSION\"... "
sed -E -e "s/(PHP_BUILD_VERSION=\")(.+)(\")/\1$VERSION\3/" -i '' bin/php-build
echo "Done"

echo "---> Staging changed files... "
git add bin/
git add man/
echo "Done"

git commit -m "Release $VERSION"

echo "---> Creating tag \"v$VERSION\"... "
git tag -a "v$VERSION" -m "Release $VERSION" > /dev/null
echo "Done"

echo
echo "Successfully released $VERSION"

# Replace {{VERSION}} with the version passed as argument:
sed -e "s/{{VERSION}}/$VERSION/" -i '' "bin/php-build"

0 comments on commit cbf2467

Please sign in to comment.