restructured the project to comply community guideline, for others check release note

This commit is contained in:
yusing
2024-09-28 09:51:34 +08:00
parent 4120fd8d1c
commit 90487bfde6
134 changed files with 1110 additions and 625 deletions

View File

@@ -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