Skip to content

Commit

Permalink
build script
Browse files Browse the repository at this point in the history
  • Loading branch information
LdDl committed Sep 11, 2024
1 parent 9eff69e commit ce62438
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ example_client/mse_example/package-lock.json
example_client/hls_example/node_modules
example_client/hls_example/.nuxt
example_client/hls_example/package-lock.json
build.sh
cmd/video_server/linux-video_server.zip
cmd/video_server/windows-video_server.zip
cmd/video_server/conf_token.json
video-server-ui
video_server
linux-amd64-video_server.tar.gz
video_server.exe
windows-video_server.zip
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export GOOS=linux && export GOARCH=amd64 && export CGO_ENABLED=0 && go build -ldflags "-s -w" -o video_server -gcflags "all=-trimpath=$GOPATH" -trimpath cmd/video_server/main.go && tar -czvf linux-amd64-video_server.tar.gz video_server
export GOOS=windows && export GOARCH=amd64 && export CGO_ENABLED=0 && go build -ldflags "-s -w" -o video_server.exe -gcflags "all=-trimpath=$GOPATH" -trimpath cmd/video_server/main.go && zip windows-video_server.zip video_server.exe

0 comments on commit ce62438

Please sign in to comment.