diff --git a/debian/changelog b/debian/changelog index 68f9f83a..b9934f2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -yq (3.3-0) focal; urgency=medium +yq (3.3.0) focal; urgency=medium * You can control string styles (quotes) using the new --style flag * String values now always have quotes when outputting to json diff --git a/debian/control b/debian/control index 8eff2036..4cd2cd46 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Roberto Mier Escandón Build-Depends: debhelper (>=10), dh-golang (>=1.34), - golang-1.13, + golang-go (>=1.13) | go (>=1.13) | go1.13, rsync Standards-Version: 4.1.4 Homepage: https://github.com/mikefarah/yq.git diff --git a/debian/rules b/debian/rules index c20a2381..b5225948 100755 --- a/debian/rules +++ b/debian/rules @@ -17,16 +17,17 @@ PROJECT := yq OWNER := mikefarah REPO := github.com -GOVERSION := 1.13 +GO := $(shell which go) export DH_OPTIONS export DH_GOPKG := ${REPO}/${OWNER}/${PROJECT} -export GOROOT := /usr/lib/go-${GOVERSION} +export GOROOT := $($(GO) env GOROOT) export GOPATH := ${CURDIR}/_build export GOBIN := ${GOPATH}/bin export PATH := ${GOROOT}/bin:${GOBIN}:${PATH} export GOCACHE := /tmp/gocache -export GOFLAGS := -mod=vendor +export GOFLAGS := -mod=vendor -modcacherw +export CGO_ENABLED := 0 SRCDIR := ${GOPATH}/src/${DH_GOPKG} DESTDIR := ${CURDIR}/debian/${PROJECT} @@ -42,10 +43,10 @@ override_dh_auto_build: # copy project to local srcdir to build from there rsync -avz --progress --exclude=_build --exclude=debian --exclude=tmp. --exclude=go.mod --exclude=docs . $(SRCDIR) # build go code - (cd ${SRCDIR} && go install -buildmode=pie ./...) + (cd ${SRCDIR} && $(GO) mod vendor && $(GO) install -buildmode=pie ./...) override_dh_auto_test: - (cd ${SRCDIR} && go test -v ./...) + (cd ${SRCDIR} && $(GO) test -v ./...) override_dh_auto_install: cp ${GOBIN}/yq ${DESTDIR}/${BINDIR}