diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 534d96a..a98eb49 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -24,4 +24,4 @@ jobs: - run: go version - name: Run GARM Go Tests - run: make go-test \ No newline at end of file + run: make test \ No newline at end of file diff --git a/Makefile b/Makefile index 8f56ea3..7409f82 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,11 @@ ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) GOPATH ?= $(shell go env GOPATH) GO ?= go -IMAGE_TAG = garm-provider-azure-build +IMAGE_TAG = garm-provider-build USER_ID=$(shell ((docker --version | grep -q podman) && echo "0" || id -u)) USER_GROUP=$(shell ((docker --version | grep -q podman) && echo "0" || id -g)) -GARM_PROVIDER_NAME := "garm-provider-azure" +GARM_PROVIDER_NAME := garm-provider-azure default: build @@ -42,13 +42,13 @@ fmt: @$(GO) fmt $$(go list ./...) fmtcheck: - @gofmt -l -s $$(go list ./... | sed -n 's/github.com\/cloudbase\/garm-provider-azure\/\(.*\)/\1/p') | grep ".*\.go"; if [ "$$?" -eq 0 ]; then echo "gofmt check failed; please tun gofmt -w -s"; exit 1;fi + @gofmt -l -s $$(go list ./... | sed -n 's/github.com\/cloudbase\/'$(GARM_PROVIDER_NAME)'\/\(.*\)/\1/p') | grep ".*\.go"; if [ "$$?" -eq 0 ]; then echo "gofmt check failed; please tun gofmt -w -s"; exit 1;fi verify-vendor: ## verify if all the go.mod/go.sum files are up-to-date $(eval TMPDIR := $(shell mktemp -d)) @cp -R ${ROOTDIR} ${TMPDIR} - @(cd ${TMPDIR}/garm-provider-azure && ${GO} mod tidy) - @diff -r -u -q ${ROOTDIR} ${TMPDIR}/garm-provider-azure >/dev/null 2>&1; if [ "$$?" -ne 0 ];then echo "please run: go mod tidy && go mod vendor"; exit 1; fi + @(cd ${TMPDIR}/$(GARM_PROVIDER_NAME) && ${GO} mod tidy) + @diff -r -u -q ${ROOTDIR} ${TMPDIR}/$(GARM_PROVIDER_NAME) >/dev/null 2>&1; if [ "$$?" -ne 0 ];then echo "please run: go mod tidy && go mod vendor"; exit 1; fi @rm -rf ${TMPDIR} verify: verify-vendor lint fmtcheck