Improve build script, ignore the builds/ folder.

This commit is contained in:
Sacha Ligthert 2023-12-14 23:42:15 +01:00
parent 5680e2a204
commit e1ce42614c
2 changed files with 11 additions and 23 deletions

24
.gitignore vendored
View File

@ -1,23 +1 @@
# ---> Go builds
# 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

10
build.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
mkdir -p builds
rm builds/*
go tool dist list | grep -v android | grep -v ios | grep -v wasip1 | awk -F '/' '{printf "echo Compiling %s/%s; env CGO_ENABLED=1 GOOS=%s GOARCH=%s go build -o builds/rowboz.%s-%s\n",$1,$2,$1,$2,$1,$2 }' | sh
cd builds
for i in `ls *windows*`; do mv -v $i $i.exe; done