File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ if [ -z " $1 " ]; then
4+ echo " Please specify the version bump type: patch|minor|major"
5+ exit 1
6+ fi
7+
38set -e # fail if any command fails
49cd ` dirname $0 ` /../..
10+ BUMP_TYPE=$1
511
612# bump versions: remove "-snapshot" suffix
7- sed -i -e ' s/"version": "\(.*\)-snapshot"/"version": "\1"/' package.json
13+ sed -i .tmp -e ' s/"version": "\(.*\)-snapshot"/"version": "\1"/' package.json
814
915# Build
10- ./jenkins_build.sh
11-
16+ # ./jenkins_build.sh
17+ grunt package
1218VERSION=` cat build/version.txt`
1319
14- # bump versions: increment version number and add "-snapshot" again
20+ # Commit and tag
21+ git add package.json
22+ git commit -m " chore(release): v$VERSION "
23+ git tag -m " v$VERSION " v$VERSION
24+
25+ # bump versions: increment version number and add "-snapshot"
1526grunt bump:$BUMP_TYPE
16- sed -i -e ' s/"version": "\(.*\)"/"version": "\1-snapshot"/' package.json
27+ NEXT_VERSION=$( node -e " console.log(require('./package.json').version)" | sed -e ' s/\r//g' )
28+ sed -i .tmp -e ' s/"version": "\(.*\)"/"version": "\1-snapshot"/' package.json
29+ git add package.json
30+ git commit -m " chore(release): start v$NEXT_VERSION "
1731
18- # commit, tag and push
19- git commit -m " chore(release): v%VERSION%"
20- git tag -m " v%VERSION%" v%VERSION%
32+ # push to github
2133# TODO git push
2234
2335# Update code.angularjs.org
You can’t perform that action at this time.
0 commit comments