Skip to content

Commit

Permalink
Use variable for provider name
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Adrian Samfira <[email protected]>
  • Loading branch information
gabriel-samfira committed Aug 5, 2024
1 parent 2a130fa commit 427c198
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- run: go version

- name: Run GARM Go Tests
run: make go-test
run: make test
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 427c198

Please sign in to comment.