diff --git a/forgejo-test-helper.sh b/forgejo-test-helper.sh index ebc53c9..a0bdc29 100755 --- a/forgejo-test-helper.sh +++ b/forgejo-test-helper.sh @@ -49,10 +49,6 @@ function api() { shift token=$1 - if ! which jq curl > /dev/null ; then - apt-get -qq install -y jq curl - fi - curl --fail -X $method -sS -H "Content-Type: application/json" -H "Authorization: token $token" "$@" $url/api/v1/$path } @@ -159,4 +155,12 @@ function push_self_action() { ) } +function dependencies() { + if ! which jq curl > /dev/null ; then + apt-get -qq install -y jq curl + fi +} + +dependencies + "$@" diff --git a/forgejo.sh b/forgejo.sh index 173d553..71d7905 100755 --- a/forgejo.sh +++ b/forgejo.sh @@ -28,7 +28,7 @@ function run() { local image="$1" local version="$2" - if dpkg --compare-versions "$version" "lt" "1.19.0-3"; then + if test "$version" != "1.19" && dpkg --compare-versions "$version" "lt" "1.19.0-3"; then actions_unit="actions.actions" else actions_unit="repo.actions"