Skip to content

Commit

Permalink
Merge branch 'release/v0.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
tectiv3 committed Feb 28, 2019
2 parents 0e035e4 + e5384f9 commit e7739a5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# .goreleaser.yml
before:
hooks:
# you may remove this if you don't use vgo
- go mod download
builds:
- binary: standardfile
ldflags:
Expand Down
35 changes: 14 additions & 21 deletions build-linux-cgo.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
#!/usr/bin/env bash
export GO111MODULE=on

go build
VERSION=$(git describe --tags)
BUILD_TIME=`date +%FT%T%z`

version=$(./standardfile -v)
xgo -ldflags="-w -X main.BuildTime=$BUILD_TIME -X main.Version=$VERSION" --targets="linux/386,linux/amd64,linux/arm-6,linux/arm-7,linux/arm64" .

xgo -ldflags="-w" --targets="linux/386,linux/amd64,linux/arm-6,linux/arm-7,linux/arm64" .
mkdir dist/linux_386
mv standardfile-linux-386 dist/linux_386/standardfile

mv standardfile-linux-386 standardfile
tar czf standardfile_${version}_linux_32-bit.tar.gz standardfile
rm -f standardfile
mkdir dist/linux_amd64
mv standardfile-linux-amd64 dist/linux_amd64/standardfile

mv standardfile-linux-amd64 standardfile
tar czf standardfile_${version}_linux_64-bit.tar.gz standardfile
rm -f standardfile
mkdir dist/linux_arm6
mv standardfile-linux-arm-6 dist/linux_arm6/standardfile

mv standardfile-linux-arm-6 standardfile
tar czf standardfile_${version}_linux_arm6.tar.gz standardfile
rm -f standardfile
mkdir dist/linux_arm7
mv standardfile-linux-arm-7 dist/linux_arm7/standardfile

mv standardfile-linux-arm-7 standardfile
tar czf standardfile_${version}_linux_arm7.tar.gz standardfile
rm -f standardfile

mv standardfile-linux-arm64 standardfile
tar czf standardfile_${version}_linux_arm8.tar.gz standardfile
rm -f standardfile

mv standardfile_${version}* dist/
mkdir dist/linux_arm8
mv standardfile-linux-arm64 dist/linux_arm8/standardfile

0 comments on commit e7739a5

Please sign in to comment.