mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
chore: update Makefile for debug build tag
This commit is contained in:
parent
fce96ff3be
commit
a478dab97b
2 changed files with 6 additions and 2 deletions
6
Makefile
6
Makefile
|
@ -27,7 +27,7 @@ endif
|
||||||
ifeq ($(debug), 1)
|
ifeq ($(debug), 1)
|
||||||
CGO_ENABLED = 0
|
CGO_ENABLED = 0
|
||||||
GODOXY_DEBUG = 1
|
GODOXY_DEBUG = 1
|
||||||
BUILD_FLAGS += -gcflags=all='-N -l'
|
BUILD_FLAGS += -gcflags=all='-N -l' -tags debug
|
||||||
else ifeq ($(pprof), 1)
|
else ifeq ($(pprof), 1)
|
||||||
CGO_ENABLED = 1
|
CGO_ENABLED = 1
|
||||||
GORACE = log_path=logs/pprof strip_path_prefix=$(shell pwd)/ halt_on_error=1
|
GORACE = log_path=logs/pprof strip_path_prefix=$(shell pwd)/ halt_on_error=1
|
||||||
|
@ -67,6 +67,10 @@ build:
|
||||||
run:
|
run:
|
||||||
[ -f .env ] && godotenv -f .env go run ${BUILD_FLAGS} ${CMD_PATH}
|
[ -f .env ] && godotenv -f .env go run ${BUILD_FLAGS} ${CMD_PATH}
|
||||||
|
|
||||||
|
debug:
|
||||||
|
make NAME="godoxy-test" debug=1 build
|
||||||
|
sh -c 'HTTP_ADDR=:81 HTTPS_ADDR=:8443 API_ADDR=:8899 DEBUG=1 bin/godoxy-test'
|
||||||
|
|
||||||
mtrace:
|
mtrace:
|
||||||
bin/godoxy debug-ls-mtrace > mtrace.json
|
bin/godoxy debug-ls-mtrace > mtrace.json
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//go:build production
|
//go:build !pprof
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue