mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 07:21:26 +02:00
restructured the project to comply community guideline, for others check release note
This commit is contained in:
12
Makefile
12
Makefile
@@ -1,3 +1,5 @@
|
||||
BUILD_FLAG ?= -s -w
|
||||
|
||||
.PHONY: all setup build test up restart logs get debug run archive repush rapid-crash debug-list-containers
|
||||
|
||||
all: debug
|
||||
@@ -10,10 +12,10 @@ setup:
|
||||
build:
|
||||
mkdir -p bin
|
||||
CGO_ENABLED=0 GOOS=linux \
|
||||
go build -ldflags '${BUILD_FLAG}' -pgo=auto -o bin/go-proxy github.com/yusing/go-proxy
|
||||
go build -ldflags '${BUILD_FLAG}' -pgo=auto -o bin/go-proxy ./cmd
|
||||
|
||||
test:
|
||||
go test ./src/...
|
||||
go test ./internal/...
|
||||
|
||||
up:
|
||||
docker compose up -d
|
||||
@@ -25,13 +27,13 @@ logs:
|
||||
docker compose logs -f
|
||||
|
||||
get:
|
||||
cd src && go get -u && go mod tidy && cd ..
|
||||
cd cmd && go get -u && go mod tidy && cd ..
|
||||
|
||||
debug:
|
||||
make build && sudo GOPROXY_DEBUG=1 bin/go-proxy
|
||||
make BUILD_FLAG="" build && sudo GOPROXY_DEBUG=1 bin/go-proxy
|
||||
|
||||
run:
|
||||
BUILD_FLAG="-s -w" make build && sudo bin/go-proxy
|
||||
make build && sudo bin/go-proxy
|
||||
|
||||
archive:
|
||||
git archive HEAD -o ../go-proxy-$$(date +"%Y%m%d%H%M").zip
|
||||
|
||||
Reference in New Issue
Block a user