Przeglądaj źródła

Improve build script, ignore the builds/ folder.

Sacha Ligthert 2 lat temu
rodzic
commit
e1ce42614c
2 zmienionych plików z 11 dodań i 23 usunięć
  1. 1 23
      .gitignore
  2. 10 0
      build.sh

+ 1 - 23
.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

+ 10 - 0
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