File tree 4 files changed +9
-13
lines changed
4 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 2
2
3
3
Script for updating code.angularjs.org repo from current local build.
4
4
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!
8
7
9
8
## Instructions
10
9
Original file line number Diff line number Diff line change 9
9
# Normalize working dir to script dir
10
10
cd ` dirname $0 `
11
11
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
18
15
SCRIPT_DIR=` pwd`
19
16
NEW_VERSION=` cat $BUILD_DIR /version.txt`
20
17
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ cd `dirname $0`/../..
17
17
18
18
echo " -- increment version "
19
19
grunt 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
22
22
echo " -- new version: ` grep ' "version"' package.json` "
23
23
echo " -- commit"
24
24
git add package.json
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ set -xe
10
10
cd ` dirname $0 ` /../..
11
11
12
12
echo " -- 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 `
15
15
echo " -- local version: $VERSION "
16
16
17
17
echo " -- commit and tag with v$VERSION "
You can’t perform that action at this time.
0 commit comments