mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +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)
|
||||
CGO_ENABLED = 0
|
||||
GODOXY_DEBUG = 1
|
||||
BUILD_FLAGS += -gcflags=all='-N -l'
|
||||
BUILD_FLAGS += -gcflags=all='-N -l' -tags debug
|
||||
else ifeq ($(pprof), 1)
|
||||
CGO_ENABLED = 1
|
||||
GORACE = log_path=logs/pprof strip_path_prefix=$(shell pwd)/ halt_on_error=1
|
||||
|
@ -67,6 +67,10 @@ build:
|
|||
run:
|
||||
[ -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:
|
||||
bin/godoxy debug-ls-mtrace > mtrace.json
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//go:build production
|
||||
//go:build !pprof
|
||||
|
||||
package main
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue