forked from coop-cloud/abra
19 lines
388 B
Makefile
19 lines
388 B
Makefile
COMMIT := $(shell git rev-list -1 HEAD)
|
|
VERSION := $(shell cat ./version)
|
|
GOPATH := $(shell go env GOPATH)
|
|
LDFLAGS := "-X 'main.Commit=$(COMMIT)' -X 'main.Version=$(VERSION)'"
|
|
|
|
all: run install build clean
|
|
|
|
run:
|
|
go run -ldflags=$(LDFLAGS) ./cmd/abra
|
|
|
|
install:
|
|
go install -ldflags=$(LDFLAGS) ./cmd/abra
|
|
|
|
build:
|
|
go build -ldflags=$(LDFLAGS) ./cmd/abra
|
|
|
|
clean:
|
|
rm '$(GOPATH)/bin/abra'
|