From 60db965ab6e48b4308d22f1129bb7e391d76cb57 Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Thu, 18 Jul 2019 09:45:18 +0000 Subject: testing/gitlab-runner: include gitlab-runner-helper cleanup go ldflags --- testing/gitlab-runner/APKBUILD | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/testing/gitlab-runner/APKBUILD b/testing/gitlab-runner/APKBUILD index 00ed2fa809..5bdb571f5b 100644 --- a/testing/gitlab-runner/APKBUILD +++ b/testing/gitlab-runner/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: pkgname="gitlab-runner" pkgver="12.0.2" -pkgrel=0 +pkgrel=1 pkgdesc="GitLab runner for CI/CD jobs" url="https://docs.gitlab.com/runner/" arch="all" @@ -22,18 +22,25 @@ prepare() { } build() { - go build -ldflags " + local ldflags=" -X gitlab.com/gitlab-org/$pkgname/common.NAME=$pkgname - -X gitlab.com/gitlab-org/$pkgname/common.BUILD=$(date -u +%Y-%m-%dT%H:%M:%S%z) - -X gitlab.com/gitlab-org/$pkgname/common.REVISION=none - -X gitlab.com/gitlab-org/$pkgname/common.BRANCH=stable - -X gitlab.com/gitlab-org/$pkgname/common.VERSION=$pkgver -s -w" \ - -o bin/$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.BUILT=$(date -u +%Y-%m-%dT%H:%M:%S%z) + -X gitlab.com/gitlab-org/$pkgname/common.BRANCH=unknown + -s -w + " + go build -ldflags "$ldflags" -o bin/gitlab-runner + go build -ldflags "$ldflags" -o bin/gitlab-runner-helper \ + ./apps/gitlab-runner-helper } package() { - install -Dm755 "$builddir"/bin/$pkgname \ - "$pkgdir"/usr/bin/$pkgname + local cmd= + for cmd in gitlab-runner gitlab-runner-helper; do + install -Dm755 "$builddir"/bin/$cmd \ + "$pkgdir"/usr/bin/$cmd + done } sha512sums="ccc1f7c8b2123f91e1ad440acaf69b2fdb435dd016c7e0c1d75c6f706d4ff79ea2eb7d34e91986d82afa3606b5453b4fbb18530f553c826809173cf88ecb810f gitlab-runner-v12.0.2.tar.gz" -- cgit v1.2.3