From 055f914f80b94267ca893c91e86f1e7707128419 Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Sun, 13 Nov 2022 08:55:54 +0300 Subject: [PATCH] Compatibility changes for Go commands --- .github/workflows/test.yml | 3 +++ ci/build.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index deb63bf..b63d393 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,3 +24,6 @@ jobs: - name: Test run: ci/test.sh + + - name: Build + run: ci/build.sh diff --git a/ci/build.sh b/ci/build.sh index 1a7b69c..07b0bc0 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -3,6 +3,6 @@ set -e export GO111MODULE="on" -go get -u github.com/mitchellh/gox # cross compile +go install github.com/mitchellh/gox@latest GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || echo rev:$(git rev-parse HEAD)` -s -w" -gox -os "linux" -arch "386 amd64" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w" \ No newline at end of file +gox -os "linux" -arch "386 amd64" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w"