From cb47cefa7b3bd8df471dac2857bb1d747011d8ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Reutersw=C3=A4rd?= Date: Sat, 16 Jan 2021 13:16:15 +0100 Subject: [PATCH] Add build script. --- cmd/opengraph/build.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 cmd/opengraph/build.sh diff --git a/cmd/opengraph/build.sh b/cmd/opengraph/build.sh new file mode 100755 index 0000000..2f24e42 --- /dev/null +++ b/cmd/opengraph/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +APP=opengraph +ARCH=amd64 + +# Set version +read -p "Version: " VERSION + +# Build for macOS +GOOS=darwin GOARCH=$ARCH go build +zip $APP-$VERSION-darwin-$ARCH.zip $APP + +# Build for Linux +GOOS=linux GOARCH=$ARCH go build +zip $APP-$VERSION-linux-$ARCH.zip $APP + +# Build for Windows +GOOS=windows GOARCH=$ARCH go build +zip $APP-$VERSION-windows-$ARCH.zip $APP.exe + +# Clean up +rm $APP +rm $APP.exe