From 7683166f262f06357a5bed980fe801c19cabb8b6 Mon Sep 17 00:00:00 2001 From: Chirayu Krishnappa Date: Wed, 15 Apr 2015 13:36:46 -0700 Subject: [PATCH 1/2] 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 #11605 --- scripts/bower/publish.sh | 16 +--------------- scripts/bower/repos.inc | 19 +++++++++++++++++++ scripts/bower/unpublish.sh | 16 +--------------- 3 files changed, 21 insertions(+), 30 deletions(-) create mode 100644 scripts/bower/repos.inc diff --git a/scripts/bower/publish.sh b/scripts/bower/publish.sh index e89f1ced0228..c7af4ccc4c86 100755 --- a/scripts/bower/publish.sh +++ b/scripts/bower/publish.sh @@ -14,21 +14,7 @@ function init { TMP_DIR=$(resolveDir ../../tmp) BUILD_DIR=$(resolveDir ../../build) NEW_VERSION=$(cat $BUILD_DIR/version.txt) - REPOS=( - angular - angular-animate - angular-aria - angular-cookies - angular-i18n - angular-loader - angular-mocks - angular-route - angular-resource - angular-sanitize - angular-scenario - angular-touch - angular-messages - ) + source $(dirname $0)/repos.inc } diff --git a/scripts/bower/repos.inc b/scripts/bower/repos.inc new file mode 100644 index 000000000000..b2b1421be1b4 --- /dev/null +++ b/scripts/bower/repos.inc @@ -0,0 +1,19 @@ +#!/bin/false +# -*- mode: sh; -*- vim: set filetype=sh: + +REPOS=( + angular + angular-animate + angular-aria + angular-cookies + angular-i18n + angular-loader + angular-message-format + angular-messages + angular-mocks + angular-resource + angular-route + angular-sanitize + angular-scenario + angular-touch +) diff --git a/scripts/bower/unpublish.sh b/scripts/bower/unpublish.sh index 683ac1cbd3be..8b415e625b67 100755 --- a/scripts/bower/unpublish.sh +++ b/scripts/bower/unpublish.sh @@ -13,21 +13,7 @@ ARG_DEFS=( function init { TMP_DIR=$(resolveDir ../../tmp) - REPOS=( - angular - angular-animate - angular-aria - angular-cookies - angular-i18n - angular-loader - angular-messages - angular-mocks - angular-route - angular-resource - angular-sanitize - angular-scenario - angular-touch - ) + source $(dirname $0)/repos.inc } function prepare { From f8f07e82200a719ecda788e295d07c882e8bd5c2 Mon Sep 17 00:00:00 2001 From: Chirayu Krishnappa Date: Wed, 15 Apr 2015 15:49:52 -0700 Subject: [PATCH 2/2] chore(bower): (un)publish angular-message-format Closes #11606 Closes #11607 --- scripts/bower/publish.sh | 2 +- scripts/bower/unpublish.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bower/publish.sh b/scripts/bower/publish.sh index c7af4ccc4c86..5189206f4384 100755 --- a/scripts/bower/publish.sh +++ b/scripts/bower/publish.sh @@ -14,7 +14,6 @@ function init { TMP_DIR=$(resolveDir ../../tmp) BUILD_DIR=$(resolveDir ../../build) NEW_VERSION=$(cat $BUILD_DIR/version.txt) - source $(dirname $0)/repos.inc } @@ -115,4 +114,5 @@ function publish { done } +source $(dirname $0)/repos.inc source $(dirname $0)/../utils.inc diff --git a/scripts/bower/unpublish.sh b/scripts/bower/unpublish.sh index 8b415e625b67..f05a5d1699a2 100755 --- a/scripts/bower/unpublish.sh +++ b/scripts/bower/unpublish.sh @@ -13,7 +13,6 @@ ARG_DEFS=( function init { TMP_DIR=$(resolveDir ../../tmp) - source $(dirname $0)/repos.inc } function prepare { @@ -39,4 +38,5 @@ function publish { done } +source $(dirname $0)/repos.inc source $(dirname $0)/../utils.inc