mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-10 07:44:43 +00:00
chore(build): fixes to release.sh
This commit is contained in:
parent
109ffac975
commit
6d01384a55
1 changed files with 21 additions and 9 deletions
|
|
@ -1,23 +1,35 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Please specify the version bump type: patch|minor|major"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
set -e # fail if any command fails
|
set -e # fail if any command fails
|
||||||
cd `dirname $0`/../..
|
cd `dirname $0`/../..
|
||||||
|
BUMP_TYPE=$1
|
||||||
|
|
||||||
# bump versions: remove "-snapshot" suffix
|
# bump versions: remove "-snapshot" suffix
|
||||||
sed -i -e 's/"version": "\(.*\)-snapshot"/"version": "\1"/' package.json
|
sed -i .tmp -e 's/"version": "\(.*\)-snapshot"/"version": "\1"/' package.json
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
./jenkins_build.sh
|
# ./jenkins_build.sh
|
||||||
|
grunt package
|
||||||
VERSION=`cat build/version.txt`
|
VERSION=`cat build/version.txt`
|
||||||
|
|
||||||
# bump versions: increment version number and add "-snapshot" again
|
# Commit and tag
|
||||||
grunt bump:$BUMP_TYPE
|
git add package.json
|
||||||
sed -i -e 's/"version": "\(.*\)"/"version": "\1-snapshot"/' package.json
|
git commit -m "chore(release): v$VERSION"
|
||||||
|
git tag -m "v$VERSION" v$VERSION
|
||||||
|
|
||||||
# commit, tag and push
|
# bump versions: increment version number and add "-snapshot"
|
||||||
git commit -m "chore(release): v%VERSION%"
|
grunt bump:$BUMP_TYPE
|
||||||
git tag -m "v%VERSION%" v%VERSION%
|
NEXT_VERSION=$(node -e "console.log(require('./package.json').version)" | sed -e 's/\r//g')
|
||||||
|
sed -i .tmp -e 's/"version": "\(.*\)"/"version": "\1-snapshot"/' package.json
|
||||||
|
git add package.json
|
||||||
|
git commit -m "chore(release): start v$NEXT_VERSION"
|
||||||
|
|
||||||
|
# push to github
|
||||||
# TODO git push
|
# TODO git push
|
||||||
|
|
||||||
# Update code.angularjs.org
|
# Update code.angularjs.org
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue