Skip to content

Commit 3ad7a1a

Browse files
committed
chore(bower): minor refactor to DRY
The REPOS list was duplicated in publish.sh and unpublish.sh but had different orderings of the repos. This commit consolidates the list into a common include file so that they are always in sync. We could improve the scripts a lot more but that's not in the current scope (this is all I need to scratch my current itch.) Closes angular#11605
1 parent 1a0bcb1 commit 3ad7a1a

File tree

3 files changed

+20
-30
lines changed

3 files changed

+20
-30
lines changed

scripts/bower/publish.sh

+1-15
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,7 @@ function init {
1414
TMP_DIR=$(resolveDir ../../tmp)
1515
BUILD_DIR=$(resolveDir ../../build)
1616
NEW_VERSION=$(cat $BUILD_DIR/version.txt)
17-
REPOS=(
18-
angular
19-
angular-animate
20-
angular-aria
21-
angular-cookies
22-
angular-i18n
23-
angular-loader
24-
angular-mocks
25-
angular-route
26-
angular-resource
27-
angular-sanitize
28-
angular-scenario
29-
angular-touch
30-
angular-messages
31-
)
17+
source $(dirname $0)/repos.inc
3218
}
3319

3420

scripts/bower/repos.inc

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/false
2+
# -*- mode: sh; -*- vim: set filetype=sh:
3+
4+
REPOS=(
5+
angular
6+
angular-animate
7+
angular-aria
8+
angular-cookies
9+
angular-i18n
10+
angular-loader
11+
angular-messages
12+
angular-mocks
13+
angular-resource
14+
angular-route
15+
angular-sanitize
16+
angular-scenario
17+
angular-touch
18+
)

scripts/bower/unpublish.sh

+1-15
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,7 @@ ARG_DEFS=(
1313

1414
function init {
1515
TMP_DIR=$(resolveDir ../../tmp)
16-
REPOS=(
17-
angular
18-
angular-animate
19-
angular-aria
20-
angular-cookies
21-
angular-i18n
22-
angular-loader
23-
angular-messages
24-
angular-mocks
25-
angular-route
26-
angular-resource
27-
angular-sanitize
28-
angular-scenario
29-
angular-touch
30-
)
16+
source $(dirname $0)/repos.inc
3117
}
3218

3319
function prepare {

0 commit comments

Comments
 (0)