diff --git a/README.md b/README.md index c58d7975..df701559 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,8 @@ rm /etc/myfile.tmp ``` ### On Ubuntu 16.04 or higher from Debian package: -``` +```sh +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64 sudo add-apt-repository ppa:rmescandon/yq sudo apt update sudo apt install yq -y diff --git a/debian/changelog b/debian/changelog index 60b55ba1..c4112c06 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +yq (3.1.1) eoan; urgency=medium + + * Keeps yaml comments and formatting, can specify yaml tags when updating. + * Handles anchors! https://github.com/mikefarah/yq/issues/310, https://github.com/mikefarah/yq/issues/178 + * Can print out matching paths and values when splatting https://github.com/mikefarah/yq/issues/20 + * JSON output works for all commands! Yaml files with multiple documents are printed out as one JSON document per line. + * Deep splat (**) to match arbitrary paths + * Update scripts file format has changed to be more powerful + * Reading and splatting, matching results are printed once per line + * Bugfixing + + -- Roberto Mier Escandon Tue, 11 Feb 2020 22:18:24 +0100 + yq (2.2-1) bionic; urgency=medium * Added Windows support for the "--inplace" command flag diff --git a/debian/control b/debian/control index 53cee5f9..4af61eb3 100644 --- a/debian/control +++ b/debian/control @@ -1,22 +1,23 @@ Source: yq Section: devel -Priority: extra +Priority: optional Maintainer: Roberto Mier Escandón -Build-Depends: debhelper (>= 9), - dh-golang, - golang-1.10-go, +Build-Depends: debhelper (>=10), + dh-golang (>=1.34), + golang-1.13, + dpkg-dev, rsync Standards-Version: 3.9.6 Homepage: https://github.com/mikefarah/yq.git Vcs-Browser: https://github.com/mikefarah/yq.git Vcs-Git: https://github.com/mikefarah/yq.git +XS-Go-Import-Path: github.com/mikefarah/yq +XSBC-Original-Maintainer: Roberto Mier Escandón Package: yq Architecture: any -Built-Using: ${misc:Built-Using} -Depends: ${shlibs:Depends}, - ${misc:Depends} -Description: - a lightweight and portable command-line YAML processor +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: a lightweight and portable command-line YAML processor . - The aim of the project is to be the [jq](https://github.com/stedolan/jq) or sed of yaml files. + The aim of the project is to be the + [jq](https://github.com/stedolan/jq) or sed of yaml files. diff --git a/debian/rules b/debian/rules index 9f370018..f9d7771a 100755 --- a/debian/rules +++ b/debian/rules @@ -14,46 +14,46 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - PROJECT := yq OWNER := mikefarah REPO := github.com -GOVERSION := 1.10 +GOVERSION := 1.13 + export DH_OPTIONS export DH_GOPKG := ${REPO}/${OWNER}/${PROJECT} export GOROOT := /usr/lib/go-${GOVERSION} export GOPATH := ${CURDIR}/_build export GOBIN := ${GOPATH}/bin export PATH := ${GOROOT}/bin:${GOBIN}:${PATH} -BLDPATH := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -SRCDIR := ${CURDIR}/_build/src/${DH_GOPKG} +export GOCACHE := /tmp/gocache +export GOFLAGS := -mod=vendor + +SRCDIR := ${GOPATH}/src/${DH_GOPKG} DESTDIR := ${CURDIR}/debian/${PROJECT} BINDIR := /usr/bin ASSETSDIR := /usr/share/${PROJECT} %: - dh $@ --buildsystem=golang --with=golang + dh $@ --builddirectory=${GOPATH} --buildsystem=golang override_dh_auto_build: mkdir -p ${SRCDIR} mkdir -p ${GOBIN} # copy project to local srcdir to build from there - rsync -avz --progress --exclude=obj-${BLDPATH} --exclude=debian . $(SRCDIR) + rsync -avz --progress --exclude=_build --exclude=debian --exclude=tmp. --exclude=go.mod . $(SRCDIR) # build go code - (cd ${SRCDIR} && go install ./...) - + (cd ${SRCDIR} && go install -buildmode=pie ./...) + override_dh_auto_test: (cd ${SRCDIR} && go test -v ./...) override_dh_auto_install: mkdir -p ${DESTDIR}/${BINDIR} mkdir -p ${DESTDIR}/${ASSETSDIR} - cp ${CURDIR}/_build/bin/yq ${DESTDIR}/${BINDIR} - cp -rf ${SRCDIR}/LICENSE ${DESTDIR}/${ASSETSDIR} - cp -rf ${SRCDIR}/README.md ${DESTDIR}/${PLUGINSDIR} + cp ${GOBIN}/yq ${DESTDIR}/${BINDIR} + cp -f ${SRCDIR}/LICENSE ${DESTDIR}/${ASSETSDIR} chmod a+x ${DESTDIR}/${BINDIR}/yq override_dh_auto_clean: dh_clean - rm -rf ${CURDIR}/obj-${BLDPATH} rm -rf ${CURDIR}/_build