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

20 lines
401 B
Makefile
Raw Normal View History

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)'"
2021-07-15 20:26:40 +00:00
ABRA := ./cmd/abra
all: run install build clean
run:
2021-07-15 20:26:40 +00:00
go run -ldflags=$(LDFLAGS) $(ABRA)
install:
2021-07-15 20:26:40 +00:00
go install -ldflags=$(LDFLAGS) $(ABRA)
build:
2021-07-15 20:26:40 +00:00
go build -ldflags=$(LDFLAGS) $(ABRA)
clean:
rm '$(GOPATH)/bin/abra'