bulid: added build-dev option
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
this otion does no optimisations in the compile (removing debug stuff)
This commit is contained in:
parent
a74d214121
commit
b0c241ae98
8
Makefile
8
Makefile
@ -2,7 +2,8 @@ ABRA := ./cmd/abra
|
||||
COMMIT := $(shell git rev-list -1 HEAD)
|
||||
GOPATH := $(shell go env GOPATH)
|
||||
VERSION := $(shell cat ./version)
|
||||
LDFLAGS := "-X 'main.Commit=$(COMMIT)' -X 'main.Version=$(VERSION)' -s -w"
|
||||
LDFLAGS := "-X 'main.Commit=$(COMMIT)' -X 'main.Version=$(VERSION)'"
|
||||
DIST_LDFLAGS := $(LDFLAGS)" -s -w"
|
||||
|
||||
all: run test install build clean format check static
|
||||
|
||||
@ -12,9 +13,12 @@ run:
|
||||
install:
|
||||
@go install -ldflags=$(LDFLAGS) $(ABRA)
|
||||
|
||||
build:
|
||||
build-dev:
|
||||
@go build -ldflags=$(LDFLAGS) $(ABRA)
|
||||
|
||||
build:
|
||||
@go build -ldflags=$(DIST_LDFLAGS) $(ABRA)
|
||||
|
||||
clean:
|
||||
@rm '$(GOPATH)/bin/abra'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user