aboutsummaryrefslogtreecommitdiffstats
path: root/community/gitlab-runner
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-09-12 22:08:47 +0200
committerLeo <thinkabit.ukim@gmail.com>2019-09-23 00:03:14 -0300
commit3fdc1d3656bdf21f4b1948b0e418e19c352c6b6c (patch)
treea77cdc33f2f2807e678603bb3e68798691fc6b45 /community/gitlab-runner
parent29b28c391806d64ba886a96febf57bc11fc05411 (diff)
downloadaports-3fdc1d3656bdf21f4b1948b0e418e19c352c6b6c.tar.bz2
aports-3fdc1d3656bdf21f4b1948b0e418e19c352c6b6c.tar.xz
community/gitlab-runner: set rev&branch during build
The git rev is used to determine which docker tag of gitlab-runner-helper to use
Diffstat (limited to 'community/gitlab-runner')
-rw-r--r--community/gitlab-runner/APKBUILD11
1 files changed, 8 insertions, 3 deletions
diff --git a/community/gitlab-runner/APKBUILD b/community/gitlab-runner/APKBUILD
index 0adb3aec1a..78744d092f 100644
--- a/community/gitlab-runner/APKBUILD
+++ b/community/gitlab-runner/APKBUILD
@@ -3,7 +3,12 @@
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gitlab-runner
pkgver=12.2.0
-pkgrel=0
+pkgrel=1
+# first 8 chars of the git hash of the release, see
+# https://gitlab.com/gitlab-org/gitlab-runner/-/tags
+# PLEASE update this, since they're used to determine what version of
+# https://hub.docker.com/r/gitlab/gitlab-runner-helper/tags to use
+_rev=a987417a
pkgdesc="GitLab runner for CI/CD jobs"
url="https://docs.gitlab.com/runner/"
arch="all"
@@ -33,9 +38,9 @@ build() {
local ldflags="
-X gitlab.com/gitlab-org/$pkgname/common.NAME=$pkgname
-X gitlab.com/gitlab-org/$pkgname/common.VERSION=$pkgver
- -X gitlab.com/gitlab-org/$pkgname/common.REVISION=unknown
+ -X gitlab.com/gitlab-org/$pkgname/common.REVISION=$_rev
-X gitlab.com/gitlab-org/$pkgname/common.BUILT=$(date -u +%Y-%m-%dT%H:%M:%S%z)
- -X gitlab.com/gitlab-org/$pkgname/common.BRANCH=unknown
+ -X gitlab.com/gitlab-org/$pkgname/common.BRANCH=master
-s -w
"
go build -ldflags "$ldflags" -o bin/gitlab-runner