This repository has been archived on 2021-07-16. You can view files and clone it, but cannot push or open issues or pull requests.
go-abra/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'