aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelley Spoon <kelley.spoon@linaro.org>2018-09-26 06:36:53 -0500
committerKelley Spoon <kelley.spoon@linaro.org>2018-10-01 12:35:24 +0000
commit40437ecfb9f7663eb798ec6bac02576f936ca5a7 (patch)
treec0a73bcba68863ed8176420224617eb2381325b9
parentabfb4176dd3213da8770c80bfff65e6a9065dbd0 (diff)
downloadlinaro-git-tools-40437ecfb9f7663eb798ec6bac02576f936ca5a7.tar.gz
CreateBundles: Change hosttype file
The create-bundle script is the only things that reference the /etc/linaro/hosttype file. In order to help simplify the git ansible playbooks, let's just source this file and let ansible define the variables at deploy time. Change-Id: I0d2f008fecf03b4648c924bbf0bba96c5a087fdb
-rwxr-xr-xbundles/create-bundle24
1 files changed, 14 insertions, 10 deletions
diff --git a/bundles/create-bundle b/bundles/create-bundle
index 67055bb..a7dfb2f 100755
--- a/bundles/create-bundle
+++ b/bundles/create-bundle
@@ -26,16 +26,20 @@ EXCLUDE=""
# wildcards, these must be full refs paths (e.g. refs/heads/*)
BRANCHES="master"
-HOSTTYPE=$(cat /etc/linaro/hosttype)
-if [ "$HOSTTYPE" = "git-main" ]; then
- SUBTREES="$BASE/lava $BASE/tools"
-elif [ "$HOSTTYPE" = "git-android" ]; then
- SUBTREES="$BASE"
- EXCLUDE="repo\.git"
- BRANCHES="refs/heads/master refs/heads/linaro*"
-else
- echo "Unknown hosttype. Make sure /etc/linaro/hosttype is set up."
- exit 1
+if [ -f /etc/linaro/git.settings ]; then
+ source /etc/linaro/git.settings
+elif [ -f /etc/linaro/hosttype ]; then
+ HOSTTYPE=$(cat /etc/linaro/hosttype)
+ if [ "$HOSTTYPE" = "git-main" ]; then
+ SUBTREES="$BASE/lava $BASE/tools"
+ elif [ "$HOSTTYPE" = "git-android" ]; then
+ SUBTREES="$BASE"
+ EXCLUDE="repo\.git"
+ BRANCHES="refs/heads/master refs/heads/linaro*"
+ else
+ echo "Unknown hosttype. Make sure /etc/linaro/hosttype is set up."
+ exit 1
+ fi
fi
if [ $(id -u -n) = "root" ]; then