summaryrefslogtreecommitdiff
path: root/testing/drone-cli/APKBUILD
blob: ce6a64b74b84dee9d23d0f2eebc4273c0c9d10e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=drone-cli
pkgver=1.5.0
pkgrel=6
pkgdesc="Drone CLI"
url="https://github.com/harness/drone-cli"
license="Apache-2.0"
arch="all"
makedepends="go"
source="drone-cli-$pkgver.tar.gz::https://github.com/harness/drone-cli/archive/v$pkgver.tar.gz"

export GOCACHE="$srcdir/go-cache"
export GOTMPDIR="$srcdir"
export GOMODCACHE="$srcdir/go"

build() {
	go build -ldflags "-X main.version=$pkgver" -o bin/drone ./drone
}

check() {
	go test ./...
}

package() {
	install -Dm755 "$builddir"/bin/drone "$pkgdir"/usr/bin/drone
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

sha512sums="
7406a4a97249b84dec6b0aaac2124cb3b907b7f5c08a80084f254614a9c7ee16d5a5541cb43b30e78bb6661906e9f170919ff0d8daf934642e54749d1990222d  drone-cli-1.5.0.tar.gz
"