]> git.lizzy.rs Git - micro.git/commitdiff
Debug off using default "go build"
authorZachary Yedidia <zyedidia@gmail.com>
Mon, 24 Feb 2020 17:55:59 +0000 (12:55 -0500)
committerZachary Yedidia <zyedidia@gmail.com>
Mon, 24 Feb 2020 17:55:59 +0000 (12:55 -0500)
Ref #1469

Makefile
internal/util/util.go

index 4d536210d3c145f11929355ce74ac9945a0317f3..5583ba2b7909e3137aa12a4805246e961e1301d9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,14 +8,15 @@ DATE = $(shell GOOS=$(shell go env GOHOSTOS) GOARCH=$(shell go env GOHOSTARCH) \
 ADDITIONAL_GO_LINKER_FLAGS = $(shell GOOS=$(shell go env GOHOSTOS) \
        GOARCH=$(shell go env GOHOSTARCH))
 GOBIN ?= $(shell go env GOPATH)/bin
-GOVARS = -X github.com/zyedidia/micro/internal/util.Version=$(VERSION) -X github.com/zyedidia/micro/internal/util.CommitHash=$(HASH) -X 'github.com/zyedidia/micro/internal/util.CompileDate=$(DATE)' -X github.com/zyedidia/micro/internal/util.Debug=OFF
+GOVARS = -X github.com/zyedidia/micro/internal/util.Version=$(VERSION) -X github.com/zyedidia/micro/internal/util.CommitHash=$(HASH) -X 'github.com/zyedidia/micro/internal/util.CompileDate=$(DATE)'
+DEBUGVAR = -X github.com/zyedidia/micro/internal/util.Debug=ON
 
 # Builds micro after checking dependencies but without updating the runtime
 build:
        go build -ldflags "-s -w $(GOVARS) $(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
 
 build-dbg:
-       go build -ldflags "-s -w $(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
+       go build -ldflags "-s -w $(ADDITIONAL_GO_LINKER_FLAGS) $(DEBUGVAR)" ./cmd/micro
 
 build-tags: fetch-tags
        go build -ldflags "-s -w $(GOVARS) $(ADDITIONAL_GO_LINKER_FLAGS)" ./cmd/micro
index 485d4f55276d691fef24383320c4c7c77a7d5c33..aebe8e17bc754e974af819c0381fff45b3e00755 100644 (file)
@@ -30,7 +30,7 @@ var (
        // CompileDate is the date this binary was compiled on
        CompileDate = "Unknown"
        // Debug logging
-       Debug = "ON"
+       Debug = "OFF"
        // FakeCursor is used to disable the terminal cursor and have micro
        // draw its own (enabled for windows consoles where the cursor is slow)
        FakeCursor = false