From e1ce42614c5408d0f4aecdce84a2f332a7a78cea Mon Sep 17 00:00:00 2001 From: Sacha Ligthert Date: Thu, 14 Dec 2023 23:42:15 +0100 Subject: [PATCH] Improve build script, ignore the builds/ folder. --- .gitignore | 24 +----------------------- build.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 23 deletions(-) create mode 100755 build.sh diff --git a/.gitignore b/.gitignore index adf8f72..ec2a80e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1 @@ -# ---> Go -# 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 - +builds \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..1f74707 --- /dev/null +++ b/build.sh @@ -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 \ No newline at end of file