diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..52a8ae6 --- /dev/null +++ b/build.bat @@ -0,0 +1,18 @@ + echo "linux" + @REM 设置环境变量linux + set GOARCH=amd64 + go env -w GOARCH=amd64 + set GOOS=linux + go env -w GOOS=linux + @REM 这里注意修改文件名------------------------ + go build -o release/aichat-api aichat.go + + + echo "windows" + @REM 设置环境回到windows + set GOOS=windows + go env -w GOOS=windows + set GOARCH=amd64 + go env -w GOARCH=amd64 + @REM 这里注意修改文件名------------------------ + go build -o release/aichat-api.exe aichat.go