File tree Expand file tree Collapse file tree 4 files changed +123
-5
lines changed Expand file tree Collapse file tree 4 files changed +123
-5
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Script for updating angular-phonecat repo from current local build.
4+
5+ echo " #################################"
6+ echo " ## Update angular-phonecat ###"
7+ echo " #################################"
8+
9+ ARG_DEFS=(
10+ " --action=(prepare|publish)"
11+ " [--no-test=(true|false)]"
12+ )
13+
14+ function init {
15+ TMP_DIR=$( resolveDir ../../tmp)
16+ BUILD_DIR=$( resolveDir ../../build)
17+ REPO_DIR=$TMP_DIR /angular-phonecat
18+ NEW_VERSION=$( cat $BUILD_DIR /version.txt)
19+ }
20+
21+ function prepare {
22+ echo " -- Cloning angular-phonecat"
23+ git clone git@github.com:angular/angular-phonecat.git $REPO_DIR
24+
25+ #
26+ # copy the files from the build
27+ #
28+ echo " -- Updating angular-phonecat"
29+ cd $REPO_DIR
30+ ./scripts/private/update-angular.sh $BUILD_DIR
31+
32+ # Test
33+ if [[ $NO_TEST != " true" ]]; then
34+ ./scripts/private/test-all.sh
35+ fi
36+
37+ # Generate demo
38+ ./scripts/private/snapshot-web.sh
39+ git checkout gh-pages
40+ git pull
41+ rm -r step*
42+ mv angular-phonecat-snapshots-web/step* .
43+ git add step*
44+ git commit -am " Angular $NEW_VERSION release"
45+ }
46+
47+ function publish {
48+ cd $REPO_DIR
49+ echo " -- Pushing angular-phonecat"
50+ git push origin master -f --tags
51+ git push origin gh-pages -f
52+ }
53+
54+ source $( dirname $0 ) /../utils.inc
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Script for updating angular-seed repo from current local build.
4+
5+ echo " #################################"
6+ echo " ## Update angular-seed ###"
7+ echo " #################################"
8+
9+ ARG_DEFS=(
10+ " --action=(prepare|publish)"
11+ " [--no-test=(true|false)]"
12+ )
13+
14+ function init {
15+ TMP_DIR=$( resolveDir ../../tmp)
16+ BUILD_DIR=$( resolveDir ../../build)
17+ REPO_DIR=$TMP_DIR /angular-seed
18+ NEW_VERSION=$( cat $BUILD_DIR /version.txt)
19+ }
20+
21+ function prepare {
22+ echo " -- Cloning angular-seed"
23+ git clone git@github.com:angular/angular-seed.git $REPO_DIR
24+
25+ #
26+ # copy the files from the build
27+ #
28+ echo " -- Updating angular-seed"
29+ cd $REPO_DIR
30+ ./scripts/update-angular.sh $BUILD_DIR
31+
32+ # Test
33+ if [[ $NO_TEST != " true" ]]; then
34+ ./scripts/test-all.sh
35+ fi
36+ }
37+
38+ function publish {
39+ cd $REPO_DIR
40+ echo " -- Pushing angular-seed"
41+ git push origin master
42+ }
43+
44+ source $( dirname $0 ) /../utils.inc
Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ ARG_DEFS=(
88 " [--no-test=(true|false)]"
99)
1010
11+ function init {
12+ if [[ ! $VERBOSE ]]; then
13+ VERBOSE=false
14+ fi
15+ VERBOSE_ARG=" --verbose=$VERBOSE "
16+ }
17+
1118function build {
1219 cd ../..
1320
@@ -22,8 +29,9 @@ function build {
2229}
2330
2431function phase {
25- ../code.angularjs.org/publish.sh --action=$1
26- ../bower/publish.sh --action=$1
32+ ACTION_ARG=" --action=$1 "
33+ ../code.angularjs.org/publish.sh $ACTION_ARG $VERBOSE_ARG
34+ ../bower/publish.sh $ACTION_ARG $VERBOSE_ARG
2735}
2836
2937function run {
Original file line number Diff line number Diff line change @@ -12,12 +12,24 @@ ARG_DEFS=(
1212
1313function init {
1414 NG_ARGS=(" $@ " )
15+ if [[ ! $VERBOSE ]]; then
16+ VERBOSE=false
17+ fi
18+ if [[ ! $NO_TEST ]]; then
19+ NO_TEST=false
20+ fi
21+ VERBOSE_ARG=" --verbose=$VERBOSE "
22+ NO_TEST_ARG=" --no_test=$VERBOSE "
1523}
1624
1725function phase {
18- ../angular.js/publish.sh --action=$1 " ${NG_ARGS[@]} "
19- ../code.angularjs.org/publish.sh --action=$1
20- ../bower/publish.sh --action=$1
26+ ACTION_ARG=" --action=$1 "
27+ ../angular.js/publish.sh $ACTION_ARG $VERBOSE_ARG $NO_TEST_ARG \
28+ --next-version-type=$NEXT_VERSION_TYPE --next-version-name=$NEXT_VERSION_NAME
29+ ../code.angularjs.org/publish.sh $ACTION_ARG $VERBOSE_ARG
30+ ../bower/publish.sh $ACTION_ARG $VERBOSE_ARG
31+ ../angular-seed/publish.sh $ACTION_ARG $VERBOSE_ARG $NO_TEST_ARG
32+ ../angular-phonecat/publish.sh $ACTION_ARG $VERBOSE_ARG $NO_TEST_ARG
2133}
2234
2335function run {
You can’t perform that action at this time.
0 commit comments