diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 23 | ||||
-rw-r--r-- | build_info.patch | 24 |
3 files changed, 42 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = skaffold pkgdesc = A command line tool that facilitates continuous development for Kubernetes applications pkgver = 0.19.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/GoogleContainerTools/skaffold arch = x86_64 license = Apache @@ -11,7 +11,9 @@ pkgbase = skaffold optdepends = google-cloud-sdk: To use GKE optdepends = minikube: To use Minikube source = skaffold-0.19.0.tar.gz::https://github.com/GoogleContainerTools/skaffold/archive/v0.19.0.tar.gz - sha256sums = 3ec621485d2ebeac3366346271527326c3c97115784597bff457ccce162be008 + source = build_info.patch + sha256sums = 48fee7f29e6dac4a301d3facf607796b04b7d1ee0b433fd083e3100bf38f7a38 + sha256sums = af5bd6a9a1e9e2f7d941ffdbd4aebd37e32bb390be03c52a578f3931997f220d pkgname = skaffold @@ -5,7 +5,7 @@ _pkgauthor=GoogleContainerTools _commit=9eb0dfc1bf634b97462c66b4dfb80e4cea378ade pkgname=skaffold pkgver=0.19.0 -pkgrel=1 +pkgrel=2 pkgdesc="A command line tool that facilitates continuous development for Kubernetes applications" arch=("x86_64") url="https://github.com/${_pkgauthor}/${pkgname}" @@ -14,20 +14,25 @@ depends=("docker" "kubectl-bin") makedepends=("go-pie") optdepends=("google-cloud-sdk: To use GKE" "minikube: To use Minikube") -source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgauthor}/${pkgname}/archive/v${pkgver}.tar.gz") -sha256sums=('48fee7f29e6dac4a301d3facf607796b04b7d1ee0b433fd083e3100bf38f7a38') +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgauthor}/${pkgname}/archive/v${pkgver}.tar.gz" + "build_info.patch") +sha256sums=("48fee7f29e6dac4a301d3facf607796b04b7d1ee0b433fd083e3100bf38f7a38" + "af5bd6a9a1e9e2f7d941ffdbd4aebd37e32bb390be03c52a578f3931997f220d") prepare() { - mkdir -p "${srcdir}/gopath/src/github.com/${_pkgauthor}" - ln -rTsf "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/gopath/src/github.com/${_pkgauthor}/${pkgname}" + mkdir -p "${srcdir}/gopath/src/github.com/${_pkgauthor}" + ln -rTsf "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/gopath/src/github.com/${_pkgauthor}/${pkgname}" + + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/build_info.patch" } build() { - export GOPATH="${srcdir}/gopath" - cd "${srcdir}/gopath/src/github.com/${_pkgauthor}/${pkgname}" - VERSION="v${pkgver}" COMMIT="${_commit}" TREE_STATE="clean" make install + export GOPATH="${srcdir}/gopath" + cd "${srcdir}/gopath/src/github.com/${_pkgauthor}/${pkgname}" + VERSION="v${pkgver}" COMMIT="${_commit}" TREE_STATE="clean" make install } package() { - install -Dm755 "${srcdir}/gopath/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + install -Dm755 "${srcdir}/gopath/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" } diff --git a/build_info.patch b/build_info.patch new file mode 100644 index 000000000000..0766af0be500 --- /dev/null +++ b/build_info.patch @@ -0,0 +1,24 @@ +diff --git a/Makefile b/Makefile +index f8516e5..4b0a773 100644 +--- a/Makefile ++++ b/Makefile +@@ -33,8 +33,9 @@ SUPPORTED_PLATFORMS := linux-$(GOARCH) darwin-$(GOARCH) windows-$(GOARCH).exe + BUILD_PACKAGE = $(REPOPATH)/cmd/skaffold + + VERSION_PACKAGE = $(REPOPATH)/pkg/skaffold/version +-COMMIT = $(shell git rev-parse HEAD) ++COMMIT ?= $(shell git rev-parse HEAD) + VERSION ?= $(shell git describe --always --tags --dirty) ++TREE_STATE ?= $(if $(shell git status --porcelain),dirty,clean) + + GO_GCFLAGS := "all=-trimpath=${PWD}" + GO_ASMFLAGS := "all=-trimpath=${PWD}" +@@ -44,7 +45,7 @@ GO_LDFLAGS += -extldflags \"${LDFLAGS}\" + GO_LDFLAGS += -X $(VERSION_PACKAGE).version=$(VERSION) + GO_LDFLAGS += -X $(VERSION_PACKAGE).buildDate=$(shell date +'%Y-%m-%dT%H:%M:%SZ') + GO_LDFLAGS += -X $(VERSION_PACKAGE).gitCommit=$(COMMIT) +-GO_LDFLAGS += -X $(VERSION_PACKAGE).gitTreeState=$(if $(shell git status --porcelain),dirty,clean) ++GO_LDFLAGS += -X $(VERSION_PACKAGE).gitTreeState=$(TREE_STATE) + GO_LDFLAGS +=" + + GO_FILES := $(shell find . -type f -name '*.go' -not -path "./vendor/*") |