From 17502ff139b8f32177cba6980fc8b6e2bf1236ee Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 12 Apr 2026 14:18:02 -0400 Subject: [PATCH] Move build output from root to bin/ directory following Go conventions Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 2 +- .openclaw/skills/srs-develop/scripts/proxy-e2e-test.sh | 2 +- Makefile | 9 +++++---- docs/proxy/proxy-origin-cluster.md | 8 ++++---- docs/proxy/proxy-usage.md | 2 +- trunk/3rdparty/srs-docs/doc/origin-cluster.md | 8 ++++---- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 53312040f..33e3cd817 100644 --- a/.gitignore +++ b/.gitignore @@ -41,7 +41,7 @@ cmake-build-debug /trunk/cmake/build # proxy (Go) -srs-proxy +/bin/ .go-formarted .env diff --git a/.openclaw/skills/srs-develop/scripts/proxy-e2e-test.sh b/.openclaw/skills/srs-develop/scripts/proxy-e2e-test.sh index 17c66e4a1..093a731e5 100755 --- a/.openclaw/skills/srs-develop/scripts/proxy-e2e-test.sh +++ b/.openclaw/skills/srs-develop/scripts/proxy-e2e-test.sh @@ -109,7 +109,7 @@ env PROXY_RTMP_SERVER=$PROXY_RTMP_PORT \ PROXY_SRT_SERVER=$PROXY_SRT_PORT \ PROXY_SYSTEM_API=$PROXY_SYSTEM_API_PORT \ PROXY_LOAD_BALANCER_TYPE=memory \ - ./srs-proxy >/tmp/srs-proxy-e2e.log 2>&1 & + ./bin/srs-proxy >/tmp/srs-proxy-e2e.log 2>&1 & PROXY_PID=$! echo "Proxy PID: $PROXY_PID" sleep 1 diff --git a/Makefile b/Makefile index 1c194e35e..8921a5619 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,11 @@ all: build -build: fmt ./srs-proxy +build: fmt bin/srs-proxy -./srs-proxy: cmd/proxy/*.go internal/**/*.go - go build -o srs-proxy ./cmd/proxy +bin/srs-proxy: cmd/proxy/*.go internal/**/*.go + @mkdir -p bin + go build -o bin/srs-proxy ./cmd/proxy test: go test ./... @@ -17,7 +18,7 @@ fmt: ./.go-formarted go fmt ./cmd/... ./internal/... clean: - rm -f srs-proxy .go-formarted + rm -rf bin .go-formarted run: fmt go run ./cmd/proxy diff --git a/docs/proxy/proxy-origin-cluster.md b/docs/proxy/proxy-origin-cluster.md index 8c7681056..16c40db8e 100644 --- a/docs/proxy/proxy-origin-cluster.md +++ b/docs/proxy/proxy-origin-cluster.md @@ -5,7 +5,7 @@ How to use the proxy server to build an origin cluster for SRS media server. ## Build To build the proxy server, you need to have Go 1.18+ installed. Then, you can build the proxy -server by below command, and get the executable binary `./srs-proxy`: +server by below command, and get the executable binary `bin/srs-proxy`: ```bash cd ~/git && @@ -43,7 +43,7 @@ First, start the proxy server: ```bash env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \ PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \ - PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy + PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy ``` > Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more @@ -96,7 +96,7 @@ First, start the proxy server: ```bash env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \ PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \ - PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy + PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy ``` > Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more @@ -145,7 +145,7 @@ First, start the proxy server: ```bash env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \ PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \ - PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy + PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy ``` > Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more diff --git a/docs/proxy/proxy-usage.md b/docs/proxy/proxy-usage.md index 5eff6de90..a9117459d 100644 --- a/docs/proxy/proxy-usage.md +++ b/docs/proxy/proxy-usage.md @@ -12,7 +12,7 @@ When running the project for testing or development, you should: ```bash make && env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \ PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \ - PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy + PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy ``` The proxy server should start and listen on the configured ports. diff --git a/trunk/3rdparty/srs-docs/doc/origin-cluster.md b/trunk/3rdparty/srs-docs/doc/origin-cluster.md index d390b61e5..d66f5d1fd 100644 --- a/trunk/3rdparty/srs-docs/doc/origin-cluster.md +++ b/trunk/3rdparty/srs-docs/doc/origin-cluster.md @@ -46,7 +46,7 @@ Please see [Protocols](#protocols) for details. ## Build To build the proxy server, you need to have Go 1.18+ installed. Then, you can build the proxy -server by below command, and get the executable binary `./srs-proxy`: +server by below command, and get the executable binary `bin/srs-proxy`: ```bash git clone https://github.com/ossrs/srs.git @@ -71,7 +71,7 @@ First, start the proxy server: ```bash env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \ PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \ - PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy + PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy ``` > Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more @@ -124,7 +124,7 @@ First, start the proxy server: ```bash env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \ PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \ - PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy + PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy ``` > Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more @@ -173,7 +173,7 @@ First, start the proxy server: ```bash env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \ PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \ - PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy + PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy ``` > Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more