File tree 2 files changed +7
-18
lines changed
2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change 2
2
3
3
Script for updating the Angular bower repos from current local build.
4
4
5
- Requires ` node ` (for parsing ` bower.json ` )
6
-
7
-
8
5
## Instructions
9
6
10
7
` grunt package ` : Build angular locally
Original file line number Diff line number Diff line change @@ -10,11 +10,8 @@ set -xe
10
10
cd ` dirname $0 `
11
11
12
12
SCRIPT_DIR=` pwd`
13
-
14
- # export so that node.js can read those env settings
15
- export TMP_DIR=../../tmp
16
- export BUILD_DIR=../../build
17
-
13
+ TMP_DIR=../../tmp
14
+ BUILD_DIR=../../build
18
15
NEW_VERSION=` cat $BUILD_DIR /version.txt`
19
16
20
17
REPOS=(
@@ -67,24 +64,19 @@ cp $BUILD_DIR/i18n/*.js $TMP_DIR/bower-angular-i18n/
67
64
cp $BUILD_DIR /angular-csp.css $TMP_DIR /bower-angular
68
65
69
66
70
- #
71
- # get the old version number
72
- #
73
-
74
- OLD_VERSION=$( node -e " console.log(require(process.env.TMP_DIR+'/bower-angular/bower').version)" | sed -e ' s/\r//g' )
75
- echo $OLD_VERSION
76
- echo $NEW_VERSION
77
-
78
67
#
79
68
# update bower.json
80
69
# tag each repo
81
70
#
82
71
83
72
for repo in " ${REPOS[@]} "
84
73
do
85
- echo " -- Updating version in bower-$repo from $OLD_VERSION to $NEW_VERSION "
74
+ echo " -- Updating version in bower-$repo to $NEW_VERSION "
86
75
cd $TMP_DIR /bower-$repo
87
- sed -i ' ' -e " s/$OLD_VERSION /$NEW_VERSION /g" bower.json
76
+ sed -i .tmp -E ' s/"(version)":[ ]*".*"/"\1": "' $NEW_VERSION ' "/g' bower.json
77
+ sed -i .tmp -E ' s/"(angular.*)":[ ]*".*"/"\1": "' $NEW_VERSION ' "/g' bower.json
78
+ # delete tmp files
79
+ rm * .tmp
88
80
git add -A
89
81
90
82
echo " -- Committing, tagging and pushing bower-$repo "
You can’t perform that action at this time.
0 commit comments