2020-02-21 14:21:07 +00:00
|
|
|
GO ?= go
|
2020-09-12 19:53:28 +00:00
|
|
|
VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
2020-02-21 14:21:07 +00:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
2021-06-22 05:01:38 +00:00
|
|
|
$(GO) build -ldflags '-w -X "main.Version=$(VERSION)"' go.jolheiser.com/git-import/cmd/git-get
|
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install:
|
|
|
|
$(GO) install -ldflags '-w -X "main.Version=$(VERSION)"' go.jolheiser.com/git-import/cmd/git-get
|
2020-02-21 14:21:07 +00:00
|
|
|
|
|
|
|
.PHONY: fmt
|
|
|
|
fmt:
|
|
|
|
$(GO) fmt ./...
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
2020-09-12 19:53:28 +00:00
|
|
|
$(GO) test --race ./...
|
2020-02-21 14:21:07 +00:00
|
|
|
|
2020-09-12 19:53:28 +00:00
|
|
|
.PHONY: vet
|
|
|
|
vet:
|
|
|
|
$(GO) vet ./...
|