CI: Fix CI_HELPER
authorJeffery To <jeffery.to@gmail.com>
Tue, 28 Nov 2023 05:12:05 +0000 (13:12 +0800)
committerRosen Penev <rosenp@gmail.com>
Fri, 1 Dec 2023 19:23:37 +0000 (11:23 -0800)
Commit 18d3c529fa4ab8dafcf6c147cf3cb55792d8ca10 caused CI_HELPER to be
set to "''" (two single quotes), leading to an error when test.sh tries
to source $CI_HELPER.

CI_HELPER is not set anywhere else and not passed into the container
environment, so there is no need to test if it has a value.

This fixes the value of CI_HELPER.

Fixes: 18d3c529fa4a ("github-ci: error on any shell errors")
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
.github/workflows/entrypoint.sh

index 8d48d8a22e0cc36acc427156947b60430fd64a24..363e1582263ae52e0bf04491cb6ad8983f1fe9ed 100755 (executable)
@@ -13,7 +13,7 @@ mkdir -p /var/lock/
 
 opkg update
 
-[ -n "${CI_HELPER:=''}" ] || CI_HELPER="/ci/.github/workflows/ci_helpers.sh"
+export CI_HELPER="/ci/.github/workflows/ci_helpers.sh"
 
 for PKG in /ci/*.ipk; do
        tar -xzOf "$PKG" ./control.tar.gz | tar xzf - ./control
@@ -42,7 +42,7 @@ for PKG in /ci/*.ipk; do
                continue
        fi
 
-       export PKG_NAME PKG_VERSION CI_HELPER
+       export PKG_NAME PKG_VERSION
 
        if [ -f "$PRE_TEST_SCRIPT" ]; then
                echo "Use package specific pre-test.sh"