From c87e4dc433615356f4e5871ff440ab9cb16e79b2 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 8 May 2022 11:13:02 -0700 Subject: [PATCH] Add build script --- .gitignore | 1 + build.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .gitignore create mode 100755 build.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..f84fe0a --- /dev/null +++ b/build.sh @@ -0,0 +1,22 @@ +#!/usr/bin/bash + +rm -rf ./build +export GOARCH=amd64 + +export GOOS=windows +go build -o ./build/$GOOS/mdv/ . +pushd build/$GOOS +7za a mdv.zip mdv +popd + +export GOOS=linux +go build -o ./build/$GOOS/mdv/ . +pushd build/$GOOS +tar czvf mdv.tar.gz mdv +popd + +export GOOS=darwin +go build -o ./build/$GOOS/mdv/ . +pushd build/$GOOS +tar czvf mdv.tar.gz mdv +popd