install the runner in /usr/local/bin

* when downloaded
* when built from sources
This commit is contained in:
Earl Warren 2023-11-04 16:29:25 +01:00
parent dede81c801
commit 1535c75993
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 5 additions and 5 deletions

View file

@ -36,7 +36,7 @@ function build_runner() {
git checkout "$version" git checkout "$version"
make build make build
) )
mv $dir/forgejo-runner/forgejo-runner . mv $dir/forgejo-runner/forgejo-runner /usr/local/bin
./forgejo-runner --version forgejo-runner --version
rm -fr "$dir" rm -fr "$dir"
} }

View file

@ -20,11 +20,11 @@ function download() {
local version="$2" local version="$2"
if ! which forgejo-runner > /dev/null; then if ! which forgejo-runner > /dev/null; then
if ! curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-${version#v}-linux-amd64 > /bin/forgejo-runner ; then if ! curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-${version#v}-linux-amd64 > /usr/local/bin/forgejo-runner ; then
# backward compatibility for for the naming scheme prior to 3.0.0 # 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 curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-linux-amd64 > /usr/local/bin/forgejo-runner
fi fi
chmod 755 /bin/forgejo-runner chmod 755 /usr/local/bin/forgejo-runner
fi fi
} }