Skip to content

Commit

Permalink
Add building script
Browse files Browse the repository at this point in the history
  • Loading branch information
unkaktus committed Oct 8, 2024
1 parent 2bd1464 commit 17e6fd1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

PROGRAM=mitten
VERSION=$(git describe --exact-match --tags)
echo $VERSION
LDFLAGS="-X main.version=$VERSION"

env GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o $PROGRAM-linux-amd64
env GOOS=linux GOARCH=arm64 go build -ldflags "$LDFLAGS" -o $PROGRAM-linux-arm64
env GOOS=darwin GOARCH=amd64 go build -ldflags "$LDFLAGS" -o $PROGRAM-darwin-amd64
env GOOS=darwin GOARCH=arm64 go build -ldflags "$LDFLAGS" -o $PROGRAM-darwin-arm64

0 comments on commit 17e6fd1

Please sign in to comment.