From b0c241ae9835c50a1229c8a054cc98ab69f449ba Mon Sep 17 00:00:00 2001 From: Roxie Gibson Date: Wed, 21 Jul 2021 08:20:17 +0100 Subject: [PATCH] bulid: added build-dev option this otion does no optimisations in the compile (removing debug stuff) --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dceeefd0..f810f175 100644 --- a/Makefile +++ b/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'