GO ?= go
VERSION ?= 0.1.0
GOARCH ?= amd64
ARCH ?= all
.PHONY: test vet build deb docker-deb clean

test:
	GOPROXY=off GOTOOLCHAIN=local $(GO) test -count=1 ./...
vet:
	GOPROXY=off GOTOOLCHAIN=local $(GO) vet ./...
build:
	mkdir -p bin
	GOPROXY=off GOTOOLCHAIN=local $(GO) build -trimpath -ldflags "-X main.version=$(VERSION)" -o bin/easydns-ui ./cmd/easydns-ui
deb:
	GOARCH=$(GOARCH) VERSION=$(VERSION) ./scripts/build-deb.sh
docker-deb:
	./scripts/build_deb.sh --arch $(ARCH) --version $(VERSION)
clean:
	rm -rf bin dist
