Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
/dist/

main
tmp
19 changes: 19 additions & 0 deletions build.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail

mkdir -p tmp

readonly systems=( windows linux darwin )
readonly archs=( amd64 arm64 )

for system in "${systems[@]}"; do
for arch in "${archs[@]}"; do
if [[ "$system" == "windows" ]] && [[ "$arch" == "arm64" ]]; then
echo "windows/arm64 not yet supported by tinygo"
continue
fi
echo "building $system/$arch"
# GOOS=${system} GOARCH=${arch} tinygo build -o tmp/"${system}_${arch}" cmd/epoch/main.go
docker run --rm -w /src -v "$(pwd)":/src -e GOOS="${system}" -e GOARCH="${arch}" tinygo/tinygo tinygo build -o "tmp/${system}_${arch}" cmd/epoch/main.go
done
done