aboutsummaryrefslogtreecommitdiffstats
path: root/testing/drone-cli/APKBUILD
blob: 413f2f39e07b4956c75b2919abc5a35d371c5887 (plain) (blame)
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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=drone-cli
pkgver=1.1.2
pkgrel=0
pkgdesc="Drone CLI"
url="https://github.com/drone/drone-cli"
arch="all"
license="Apache-2.0"
makedepends="go"
source="drone-cli-$pkgver.tar.gz::https://github.com/drone/drone-cli/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/drone/$pkgname"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
	cd "$builddir"
	default_prepare
}

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

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

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

sha512sums="aa1ff4208f551cec789ccb1e6fea2e739aaa95ae1a7173893f25939fe43e471ea84a60515696e2375833d8dad4c63d00a46aa2ad82ac05ad50b29a9f229b3296  drone-cli-1.1.2.tar.gz"