.PHONY: runtime
-VERSION = $(shell git describe --tags --abbrev=0)
+VERSION = $(shell go run tools/build-version.go)
HASH = $(shell git rev-parse --short HEAD)
DATE = $(shell go run tools/build-date.go)
# Builds micro after checking dependencies but without updating the runtime
build: deps tcell
- go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)'" ./cmd/micro
+ go build -ldflags "-s -w -X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)'" ./cmd/micro
# Builds micro after building the runtime and checking dependencies
build-all: runtime build
# Builds micro without checking for dependencies
build-quick:
- go build -ldflags "-X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)'" ./cmd/micro
+ go build -ldflags "-s -w -X main.Version=$(VERSION) -X main.CommitHash=$(HASH) -X 'main.CompileDate=$(DATE)'" ./cmd/micro
# Same as 'build' but installs to $GOPATH/bin afterward
install: build
+ mkdir -p $(GOPATH)/bin
mv micro $(GOPATH)/bin
# Same as 'build-all' but installs to $GOPATH/bin afterward
# Same as 'build-quick' but installs to $GOPATH/bin afterward
install-quick: build-quick
+ mkdir -p $(GOPATH)/bin
mv micro $(GOPATH)/bin
# Updates tcell