summaryrefslogtreecommitdiffstats
path: root/scripts/ci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci')
-rwxr-xr-xscripts/ci/configure.sh27
1 files changed, 22 insertions, 5 deletions
diff --git a/scripts/ci/configure.sh b/scripts/ci/configure.sh
index 67563ed..ae78f06 100755
--- a/scripts/ci/configure.sh
+++ b/scripts/ci/configure.sh
@@ -9,10 +9,16 @@ TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo}
9TEST_BITBAKE_COMMON_DIR=${TEST_BITBAKE_COMMON_DIR:-} 9TEST_BITBAKE_COMMON_DIR=${TEST_BITBAKE_COMMON_DIR:-}
10 10
11TEST_AKTUALIZR_REMOTE=${TEST_AKTUALIZR_REMOTE:-} 11TEST_AKTUALIZR_REMOTE=${TEST_AKTUALIZR_REMOTE:-}
12TEST_AKTUALIZR_TAG=${TEST_AKTUALIZR_TAG:-}
12if [ -n "$TEST_AKTUALIZR_REMOTE" ]; then 13if [ -n "$TEST_AKTUALIZR_REMOTE" ]; then
13 TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} 14 if [ -n "$TEST_AKTUALIZR_TAG" ]; then
14 TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} 15 TEST_AKTUALIZR_BRANCH=""
15 TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="$TEST_AKTUALIZR_DIR/.git" git rev-parse "$TEST_AKTUALIZR_REMOTE/$TEST_AKTUALIZR_BRANCH")} 16 TEST_AKTUALIZR_REV=""
17 else
18 TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.}
19 TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master}
20 TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="$TEST_AKTUALIZR_DIR/.git" git rev-parse "$TEST_AKTUALIZR_REMOTE/$TEST_AKTUALIZR_BRANCH")}
21 fi
16fi 22fi
17 23
18TEST_AKTUALIZR_CREDENTIALS=${TEST_AKTUALIZR_CREDENTIALS:-} 24TEST_AKTUALIZR_CREDENTIALS=${TEST_AKTUALIZR_CREDENTIALS:-}
@@ -43,12 +49,23 @@ EOF
43 49
44if [ -n "$TEST_AKTUALIZR_REMOTE" ]; then 50if [ -n "$TEST_AKTUALIZR_REMOTE" ]; then
45 echo ">> Set aktualizr branch in bitbake's config" 51 echo ">> Set aktualizr branch in bitbake's config"
46 cat << EOF >> "$SITE_CONF" 52 if [ -n "$TEST_AKTUALIZR_TAG" ]; then
53 # tag case
54 cat << EOF >> "$SITE_CONF"
55SRCREV_pn-aktualizr = ""
56SRCREV_pn-aktualizr-native = ""
57BRANCH_pn-aktualizr = ";nobranch=1;tag=$TEST_AKTUALIZR_TAG"
58BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}"
59EOF
60 else
61 # branch case
62 cat << EOF >> "$SITE_CONF"
47SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" 63SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV"
48SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" 64SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}"
49BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" 65BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH"
50BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}" 66BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}"
51EOF 67EOF
68 fi
52fi 69fi
53 70
54if [[ -n $TEST_AKTUALIZR_CREDENTIALS ]]; then 71if [[ -n $TEST_AKTUALIZR_CREDENTIALS ]]; then
@@ -70,5 +87,5 @@ DL_DIR = "$DL_DIR"
70EOF 87EOF
71fi 88fi
72 89
73echo -e ">> Final configuration (site.conf):\n" 90echo -e ">> Final configuration (site.conf):\\n"
74cat "$SITE_CONF" 91cat "$SITE_CONF"