File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33Script for updating code.angularjs.org repo from current local build.
44
5- Requires ` node ` (for parsing ` bower.json ` )
6-
7- Note: This should only be run for a release build, not a snapshot build!
5+ Note: For a snapshot build, this will fetch the data from the ci server
6+ and NOT take the local build!
87
98## Instructions
109
Original file line number Diff line number Diff line change 99# Normalize working dir to script dir
1010cd ` dirname $0 `
1111
12-
13- # export so that node.js can read those env settings
14- export TMP_DIR=../../tmp
15- export REPO_DIR=$TMP_DIR /code.angularjs.org
16- export BUILD_DIR=../../build
17-
12+ TMP_DIR=../../tmp
13+ REPO_DIR=$TMP_DIR /code.angularjs.org
14+ BUILD_DIR=../../build
1815SCRIPT_DIR=` pwd`
1916NEW_VERSION=` cat $BUILD_DIR /version.txt`
2017
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ cd `dirname $0`/../..
1717
1818echo " -- increment version "
1919grunt bump:$BUMP_TYPE
20- NEXT_VERSION=$( node -e " console.log(require('./package.json'). version) " | sed -e ' s/\r//g ' )
21- sed -i .tmp -e ' s/"version": "\ (.*\ )"/"version": "\1-snapshot"/' package.json
20+ NEXT_VERSION=` sed -En ' s/.*" version"[ ]*:[ ]*"(.*)".*/\1/p ' package.json `
21+ sed -i .tmp -E ' s/"version": "(.*)"/"version": "\1-snapshot"/' package.json
2222echo " -- new version: ` grep ' "version"' package.json` "
2323echo " -- commit"
2424git add package.json
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ set -xe
1010cd ` dirname $0 ` /../..
1111
1212echo " -- old version: ` grep ' "version"' package.json` "
13- sed -i .tmp -e ' s/"version": "\ (.*\ )-snapshot"/"version": "\1"/' package.json
14- VERSION=$( node -e " console.log(require('./package.json'). version) " | sed -e ' s/\r//g ' )
13+ sed -i .tmp -E ' s/"version": "(.*)-snapshot"/"version": "\1"/' package.json
14+ VERSION=` sed -En ' s/.*" version"[ ]*:[ ]*"(.*)".*/\1/p ' package.json `
1515echo " -- local version: $VERSION "
1616
1717echo " -- commit and tag with v$VERSION "
You can’t perform that action at this time.
0 commit comments