diff options
Diffstat (limited to 'scripts/ci')
-rwxr-xr-x | scripts/ci/configure.sh | 27 |
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} | |||
9 | TEST_BITBAKE_COMMON_DIR=${TEST_BITBAKE_COMMON_DIR:-} | 9 | TEST_BITBAKE_COMMON_DIR=${TEST_BITBAKE_COMMON_DIR:-} |
10 | 10 | ||
11 | TEST_AKTUALIZR_REMOTE=${TEST_AKTUALIZR_REMOTE:-} | 11 | TEST_AKTUALIZR_REMOTE=${TEST_AKTUALIZR_REMOTE:-} |
12 | TEST_AKTUALIZR_TAG=${TEST_AKTUALIZR_TAG:-} | ||
12 | if [ -n "$TEST_AKTUALIZR_REMOTE" ]; then | 13 | if [ -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 | ||
16 | fi | 22 | fi |
17 | 23 | ||
18 | TEST_AKTUALIZR_CREDENTIALS=${TEST_AKTUALIZR_CREDENTIALS:-} | 24 | TEST_AKTUALIZR_CREDENTIALS=${TEST_AKTUALIZR_CREDENTIALS:-} |
@@ -43,12 +49,23 @@ EOF | |||
43 | 49 | ||
44 | if [ -n "$TEST_AKTUALIZR_REMOTE" ]; then | 50 | if [ -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" | ||
55 | SRCREV_pn-aktualizr = "" | ||
56 | SRCREV_pn-aktualizr-native = "" | ||
57 | BRANCH_pn-aktualizr = ";nobranch=1;tag=$TEST_AKTUALIZR_TAG" | ||
58 | BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}" | ||
59 | EOF | ||
60 | else | ||
61 | # branch case | ||
62 | cat << EOF >> "$SITE_CONF" | ||
47 | SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" | 63 | SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" |
48 | SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" | 64 | SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" |
49 | BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" | 65 | BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" |
50 | BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}" | 66 | BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}" |
51 | EOF | 67 | EOF |
68 | fi | ||
52 | fi | 69 | fi |
53 | 70 | ||
54 | if [[ -n $TEST_AKTUALIZR_CREDENTIALS ]]; then | 71 | if [[ -n $TEST_AKTUALIZR_CREDENTIALS ]]; then |
@@ -70,5 +87,5 @@ DL_DIR = "$DL_DIR" | |||
70 | EOF | 87 | EOF |
71 | fi | 88 | fi |
72 | 89 | ||
73 | echo -e ">> Final configuration (site.conf):\n" | 90 | echo -e ">> Final configuration (site.conf):\\n" |
74 | cat "$SITE_CONF" | 91 | cat "$SITE_CONF" |