From d1a4854024feb70a12d08fa899c5f3639eb87ff4 Mon Sep 17 00:00:00 2001 From: "Guo Y.K" Date: Tue, 22 Jun 2021 09:45:17 +0800 Subject: [PATCH] add dist script --- .gitignore | 9 +++++++++ dist.sh | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 dist.sh diff --git a/.gitignore b/.gitignore index 51e25af..36b189a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,12 @@ # GoLand .idea/ + +# macOS +.DS_Store +._* + +# Output +output-*/ +dist/ +/gcoredl diff --git a/dist.sh b/dist.sh new file mode 100755 index 0000000..8991849 --- /dev/null +++ b/dist.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -eux + +cd $(dirname $0) + +rm -rf dist +mkdir -p dist + +_build() { + GOOS=$1 GOARCH=$2 CGO_ENABLED=0 go build -o dist/gcoredl-$1-$2 +} + +_build windows amd64 +_build linux amd64 +_build linux arm64 +_build darwin amd64 +_build darwin arm64