-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add ignorefile and build script
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
|
||
# Go build file | ||
build | ||
|
||
# Debug file | ||
__debug_bin* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
file=$(date '+%Y%m%d%H%M%S') | ||
|
||
echo "Building Linux versions..." | ||
GOOS=linux GOARCH=amd64 go build -o build/$file/Anonymous-Bot-64 -trimpath -ldflags "-s -w -buildid=" cmd/main.go | ||
GOOS=linux GOARCH=arm64 go build -o build/$file/Anonymous-Bot-arm64 -trimpath -ldflags "-s -w -buildid=" cmd/main.go | ||
|
||
# 打包 Windows 版本 | ||
echo "Building Windows versions..." | ||
GOOS=windows GOARCH=amd64 go build -o build/$file/Anonymous-Bot-windows.exe -trimpath -ldflags "-s -w -buildid=" cmd/main.go | ||
GOOS=windows GOARCH=arm64 go build -o build/$file/Anonymous-Bot-windows-arm64.exe -trimpath -ldflags "-s -w -buildid=" cmd/main.go | ||
|
||
# 打包 macOS 版本 | ||
echo "Building macOS versions..." | ||
GOOS=darwin GOARCH=arm64 go build -o build/$file/Anonymous-Bot-macos-arm64 -trimpath -ldflags "-s -w -buildid=" cmd/main.go | ||
|
||
echo "打包完成" |