From 45ce8e2644b4efa7237138fe3d648331ea28359b Mon Sep 17 00:00:00 2001 From: ehila Date: Mon, 10 Apr 2023 09:50:59 -0400 Subject: [PATCH 1/3] fix: add correct bin path for microshift and lichen Signed-off-by: ehila --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9a6eea1331..f59d3e0926 100644 --- a/Makefile +++ b/Makefile @@ -280,13 +280,13 @@ clean: clean-cross-build .PHONY: clean licensecheck: microshift bin/lichen - bin/lichen -c .lichen.yaml microshift + $(GO_BUILD_BINDIR)/lichen -c .lichen.yaml $(GO_BUILD_BINDIR)/microshift bin: mkdir -p $@ bin/lichen: bin vendor/modules.txt - GOBIN=$(realpath ./bin) go install github.com/uw-labs/lichen@latest + GOBIN=$(realpath $(GO_BUILD_BINDIR)) go install github.com/uw-labs/lichen@latest vendor: go mod vendor From b2fb21868e41ffcbcecefebb010fff9dae68d0d9 Mon Sep 17 00:00:00 2001 From: ehila Date: Mon, 10 Apr 2023 09:51:14 -0400 Subject: [PATCH 2/3] feat: add licensecheck to verify task Signed-off-by: ehila --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f59d3e0926..5d767d40fa 100644 --- a/Makefile +++ b/Makefile @@ -115,8 +115,8 @@ etcd: $(LD_FLAGS)\"" \ $(MAKE) -C etcd -.PHONY: verify verify-images verify-assets -verify: verify-images verify-assets verify-sh verify-container +.PHONY: verify verify-images verify-assets licensecheck +verify: verify-images verify-assets verify-sh verify-container licensecheck verify-images: ./hack/verify_images.sh From 851ab1d8a73bdc0c96de1c54835e7b31aa5da0f4 Mon Sep 17 00:00:00 2001 From: ehila Date: Mon, 10 Apr 2023 11:18:48 -0400 Subject: [PATCH 3/3] feat: moved install step to fetch tools and cleaned up task Signed-off-by: ehila --- Makefile | 11 +++-------- scripts/fetch_tools.sh | 5 +++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5d767d40fa..2e37a15381 100644 --- a/Makefile +++ b/Makefile @@ -279,14 +279,9 @@ clean-cross-build: clean: clean-cross-build .PHONY: clean -licensecheck: microshift bin/lichen - $(GO_BUILD_BINDIR)/lichen -c .lichen.yaml $(GO_BUILD_BINDIR)/microshift - -bin: - mkdir -p $@ - -bin/lichen: bin vendor/modules.txt - GOBIN=$(realpath $(GO_BUILD_BINDIR)) go install github.com/uw-labs/lichen@latest +licensecheck: microshift + ./scripts/fetch_tools.sh lichen && \ + ./_output/bin/lichen -c .lichen.yaml ./_output/bin/microshift vendor: go mod vendor diff --git a/scripts/fetch_tools.sh b/scripts/fetch_tools.sh index c2b277a444..6a093a6e95 100755 --- a/scripts/fetch_tools.sh +++ b/scripts/fetch_tools.sh @@ -139,6 +139,11 @@ get_hadolint() { _install "${url}" "${checksum}" "${filename}" "hadolint-Linux-${arch}" } +get_lichen() { + local ver="v0.1.7" + GOBIN=${DEST_DIR} GOFLAGS="" go install github.com/uw-labs/lichen@${ver} +} + tool_getters=$(declare -F | cut -d' ' -f3 | grep "get_" | sed 's/get_//g') usage() {