From 6fcf756ff21991a0b7732d4016728c07f89f58e3 Mon Sep 17 00:00:00 2001 From: Sam Weston Date: Thu, 1 Oct 2020 09:34:03 +0100 Subject: [PATCH 1/2] fix: pagination bug #225 and fix tests on Ubuntu --- Makefile | 4 ++-- api/v1/registry/client/request/request.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index cf9cea7..895689a 100644 --- a/Makefile +++ b/Makefile @@ -32,13 +32,13 @@ unit-test: @find . \ -mindepth 2 -type f ! -path "./vendor/*" ! -path "./api/*" -name "*_test.go" \ | xargs -I {} dirname {} \ - | xargs -I {} sh -c "pushd {}; go test -v -cover || exit 1; popd" + | xargs -I {} bash -c "pushd {}; go test -v -cover || exit 1; popd" whitebox-integration-test: @find . \ -mindepth 2 -type f -path "./api/*" -name "*_test.go" \ | xargs -I {} dirname {} \ - | xargs -I {} sh -c "pushd {}; go test -v -cover || exit 1; popd" + | xargs -I {} bash -c "pushd {}; go test -v -cover || exit 1; popd" coverage: PROJECT:=github.com/ivanilves/lstags coverage: SERVICE:=ci diff --git a/api/v1/registry/client/request/request.go b/api/v1/registry/client/request/request.go index af4c7fd..9703c33 100644 --- a/api/v1/registry/client/request/request.go +++ b/api/v1/registry/client/request/request.go @@ -124,7 +124,7 @@ func getNextLink(headers []string) string { nextlink := headers[0] nextlink = strings.Split(nextlink, "?")[1] - nextlink = strings.Split(nextlink, ";")[0] + nextlink = strings.Split(nextlink, ">")[0] return nextlink } From 9ea36fc96ea101187599c43bf6402107026fef0b Mon Sep 17 00:00:00 2001 From: Sam Weston Date: Thu, 1 Oct 2020 09:54:46 +0100 Subject: [PATCH 2/2] fix: Resolve problem when running release in Circle CI --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index fec1b47..9b1eb16 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,6 +77,7 @@ jobs: - run: name: Build release assets and binaries command: | + git reset --hard make release ./dist/assets/lstags-linux/lstags --version