summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredy García2018-11-17 15:09:52 -0500
committerFredy García2018-11-17 15:09:52 -0500
commit7226eabb86859edcaf418f75bab25d39f19d5a12 (patch)
tree151235986988054cf5cfd519da984182e8c89684
parentcf4be235344435e6986547635191b07ae3789eac (diff)
downloadaur-7226eabb86859edcaf418f75bab25d39f19d5a12.tar.gz
Adding correct git commit and adding .tar.gz to source file.
-rw-r--r--.SRCINFO6
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD43
-rw-r--r--build_flags.patch24
4 files changed, 44 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 889722cf2678..b22d1fed421a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = skaffold
pkgdesc = A command line tool that facilitates continuous development for Kubernetes applications
pkgver = 0.18.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/GoogleContainerTools/skaffold
arch = x86_64
license = Apache
@@ -10,10 +10,10 @@ pkgbase = skaffold
depends = kubectl-bin
optdepends = google-cloud-sdk: To use GKE
optdepends = minikube: To use Minikube
- source = skaffold-0.18.0::https://github.com/GoogleContainerTools/skaffold/archive/v0.18.0.tar.gz
+ source = skaffold-0.18.0.tar.gz::https://github.com/GoogleContainerTools/skaffold/archive/v0.18.0.tar.gz
source = build_flags.patch
sha256sums = 3ec621485d2ebeac3366346271527326c3c97115784597bff457ccce162be008
- sha256sums = 03be8856eec2169b72fae7369ce11c32a66cd49638e4e68bae7f63b0d5519a6a
+ sha256sums = 3e32d942fa54099a5f14dd65ef3c08e5a89a82cd90f1cd05a43715e4ba597d06
pkgname = skaffold
diff --git a/.gitignore b/.gitignore
index a00c0106f0f8..be95d9927202 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
skaffold-*.pkg.tar.xz
-skaffold-*
+skaffold-*.tar.gz
+skaffold-*.log
PKGBUILD-namcap.log
pkg/
src/
diff --git a/PKGBUILD b/PKGBUILD
index 9d86e754dbdc..2b157f7e8279 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,36 +2,37 @@
# Maintainer: Maxim Baz <$pkgbuild at maximbaz dot com>
_pkgauthor=GoogleContainerTools
+_commit=34651689be78b2c6bcfbace5072b00b93661f895
pkgname=skaffold
pkgver=0.18.0
-pkgrel=2
-pkgdesc='A command line tool that facilitates continuous development for Kubernetes applications'
-arch=('x86_64')
-url="https://github.com/$_pkgauthor/$pkgname"
-license=('Apache')
-depends=('docker' 'kubectl-bin')
-makedepends=('go-pie')
-optdepends=('google-cloud-sdk: To use GKE'
- 'minikube: To use Minikube')
-source=("$pkgname-$pkgver::https://github.com/$_pkgauthor/$pkgname/archive/v$pkgver.tar.gz"
- 'build_flags.patch')
-sha256sums=('3ec621485d2ebeac3366346271527326c3c97115784597bff457ccce162be008'
- '03be8856eec2169b72fae7369ce11c32a66cd49638e4e68bae7f63b0d5519a6a')
+pkgrel=3
+pkgdesc="A command line tool that facilitates continuous development for Kubernetes applications"
+arch=("x86_64")
+url="https://github.com/${_pkgauthor}/${pkgname}"
+license=("Apache")
+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"
+ "build_flags.patch")
+sha256sums=("3ec621485d2ebeac3366346271527326c3c97115784597bff457ccce162be008"
+ "3e32d942fa54099a5f14dd65ef3c08e5a89a82cd90f1cd05a43715e4ba597d06")
prepare() {
- mkdir -p "gopath/src/github.com/$_pkgauthor"
- ln -rTsf "$pkgname-$pkgver" "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 "$pkgname-$pkgver"
- patch -Np1 -i ../build_flags.patch
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/build_flags.patch"
}
build() {
- export GOPATH="$srcdir/gopath"
- cd "gopath/src/github.com/$_pkgauthor/$pkgname"
- VERSION="v$pkgver" 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 "gopath/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -Dm755 "${srcdir}/gopath/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}
diff --git a/build_flags.patch b/build_flags.patch
index da945a0b1cb3..a7c4cf0a4e87 100644
--- a/build_flags.patch
+++ b/build_flags.patch
@@ -1,20 +1,30 @@
diff --git a/Makefile b/Makefile
-index caa9d41f..f8516e59 100644
+index caa9d41..4b0a773 100644
--- a/Makefile
+++ b/Makefile
-@@ -36,7 +36,11 @@ VERSION_PACKAGE = $(REPOPATH)/pkg/skaffold/version
- COMMIT = $(shell git rev-parse HEAD)
- VERSION ?= $(shell git describe --always --tags --dirty)
+@@ -33,14 +33,19 @@ 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}"
-+
+
GO_LDFLAGS :="
+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)
-@@ -50,7 +54,7 @@ $(BUILD_DIR)/$(PROJECT): $(BUILD_DIR)/$(PROJECT)-$(GOOS)-$(GOARCH)
+-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/*")
+@@ -50,7 +55,7 @@ $(BUILD_DIR)/$(PROJECT): $(BUILD_DIR)/$(PROJECT)-$(GOOS)-$(GOARCH)
cp $(BUILD_DIR)/$(PROJECT)-$(GOOS)-$(GOARCH) $@
$(BUILD_DIR)/$(PROJECT)-%-$(GOARCH): $(GO_FILES) $(BUILD_DIR)
@@ -23,7 +33,7 @@ index caa9d41f..f8516e59 100644
%.sha256: %
shasum -a 256 $< > $@
-@@ -76,7 +80,7 @@ test:
+@@ -76,7 +81,7 @@ test:
.PHONY: install
install: $(GO_FILES) $(BUILD_DIR)