forked from php-build/php-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-release.sh
More file actions
executable file
·50 lines (37 loc) · 870 Bytes
/
make-release.sh
File metadata and controls
executable file
·50 lines (37 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
set -e
VERSION="$1"
if [ -z "$VERSION" ]; then
echo "make-release.sh: No Version given." >&2
exit 1
fi
echo "Releasing $VERSION"
echo "==="
echo
echo "---> Creating release branch... "
{
git branch "release/$VERSION" master
git checkout "release/$VERSION"
} > /dev/null
echo "Done"
echo
echo "---> Building documentation... "
./build-docs.sh "$VERSION" > /dev/null
echo "Done"
echo
echo "---> Updating version number to \"$VERSION\"... "
sed -E -e "s/(PHP_BUILD_VERSION=\")(.+)(\")/\1$VERSION\3/" -i '' bin/php-build
./bin/php-build --version
echo "Done"
echo
echo "---> Staging changed files... "
git add bin/
git add man/
git commit -m "Release $VERSION"
echo "Done"
echo
echo "---> Creating tag \"v$VERSION\"... "
git tag -a "v$VERSION" -m "Release $VERSION" > /dev/null
echo "Done"
echo
echo "Successfully released $VERSION"