git-import/Makefile

22 lines
444 B
Makefile
Raw Permalink Normal View History

GO ?= go
VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
.PHONY: build
build:
$(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
.PHONY: fmt
fmt:
$(GO) fmt ./...
.PHONY: test
test:
$(GO) test --race ./...
.PHONY: vet
vet:
$(GO) vet ./...