Skip to content

Commit

Permalink
Refine makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Sep 9, 2024
1 parent 2e7f2c2 commit 7b20e58
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion proxy/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
srs-proxy
.env
.env
.go-formarted
11 changes: 8 additions & 3 deletions proxy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

all: build

build: fmt
build: fmt ./srs-proxy

./srs-proxy: *.go
go build -o srs-proxy .

test:
go test ./...

fmt:
fmt: ./.go-formarted

./.go-formarted: *.go
touch .go-formarted
go fmt ./...

clean:
rm -f srs-proxy
rm -f srs-proxy .go-formarted

run: fmt
go run .
1 change: 1 addition & 0 deletions proxy/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func loadEnvFile(ctx context.Context) error {
return nil
}

// buildDefaultEnvironmentVariables setups the default environment variables.
func buildDefaultEnvironmentVariables(ctx context.Context) {
// Whether enable the Go pprof.
setEnvDefault("GO_PPROF", "")
Expand Down

0 comments on commit 7b20e58

Please sign in to comment.