From 78e5741fbab8a7f7f9c54b0d78a456bb80560fcc Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 4 Oct 2023 17:01:08 +0200 Subject: [PATCH] v3.0.0 and above have a different naming scheme --- forgejo-runner.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/forgejo-runner.sh b/forgejo-runner.sh index 4c955b6..bc3d165 100755 --- a/forgejo-runner.sh +++ b/forgejo-runner.sh @@ -16,7 +16,10 @@ function download() { local version="$2" if ! which forgejo-runner > /dev/null; then - curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-amd64 > /bin/forgejo-runner + if ! curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-${version#v}-linux-amd64 > /bin/forgejo-runner ; then + # backward compatibility for for the naming scheme prior to 3.0.0 + curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-linux-amd64 > /bin/forgejo-runner + fi chmod 755 /bin/forgejo-runner fi }