bulid: added build-dev option
continuous-integration/drone/push Build is passing Details

this otion does no optimisations in the compile (removing debug stuff)
This commit is contained in:
Roxie Gibson 2021-07-21 08:20:17 +01:00
parent a74d214121
commit b0c241ae98
Signed by untrusted user: roxxers
GPG Key ID: 5D0140EDEE123F4D
1 changed files with 6 additions and 2 deletions

View File

@ -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'