2013-12-13 20:49:42 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2013-12-14 04:02:15 +00:00
|
|
|
echo "#################################"
|
|
|
|
|
echo "#### Cut release ################"
|
|
|
|
|
echo "#################################"
|
|
|
|
|
|
|
|
|
|
if [ "$1" != "patch" -a "$1" != "minor" -a "$1" != "major" ]; then
|
|
|
|
|
echo "Please specify the next version type: patch|minor|major"
|
|
|
|
|
exit 1
|
2013-12-13 22:13:23 +00:00
|
|
|
fi
|
2013-12-14 04:02:15 +00:00
|
|
|
BUMP_TYPE=$1
|
2013-12-13 22:13:23 +00:00
|
|
|
|
2013-12-14 04:02:15 +00:00
|
|
|
# Enable tracing and exit on first failure
|
|
|
|
|
set -xe
|
|
|
|
|
# Normalize working dir to script dir
|
2013-12-13 20:49:42 +00:00
|
|
|
cd `dirname $0`/../..
|
|
|
|
|
|
2013-12-14 04:02:15 +00:00
|
|
|
|
|
|
|
|
# Bump versions: remove "-snapshot" suffix
|
|
|
|
|
./scripts/jenkins/bump-remove-snapshot.sh
|
2013-12-13 20:49:42 +00:00
|
|
|
|
|
|
|
|
# Build
|
2013-12-13 22:33:43 +00:00
|
|
|
./jenkins_build.sh
|
2013-12-13 22:13:23 +00:00
|
|
|
|
2013-12-14 04:02:15 +00:00
|
|
|
# Bump versions: Increment version and add "-snapshot"
|
|
|
|
|
./scripts/jenkins/bump-increment.sh $BUMP_TYPE
|
2013-12-13 20:49:42 +00:00
|
|
|
|
2013-12-14 04:02:15 +00:00
|
|
|
echo "-- push to Github"
|
2013-12-13 22:13:23 +00:00
|
|
|
# push to github
|
2013-12-14 04:02:15 +00:00
|
|
|
git push
|
2013-12-13 20:49:42 +00:00
|
|
|
|
|
|
|
|
# Update code.angularjs.org
|
|
|
|
|
./scripts/code.angularjs.org/publish.sh
|
|
|
|
|
|
2013-12-14 04:02:15 +00:00
|
|
|
# Update bower
|
2013-12-13 20:49:42 +00:00
|
|
|
./scripts/bower/publish.sh
|
|
|
|
|
|
|
|
|
|
|