Skip to content

Commit

Permalink
Update xgo build script
Browse files Browse the repository at this point in the history
  • Loading branch information
tectiv3 committed Jun 29, 2018
1 parent 8dca9ae commit ed7196d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions build-linux-cgo.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
#!/usr/bin/env bash

go build

version=$(./standardfile -v)

xgo --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" .

mv standardfile-linux-386 standardfile
tar czf standardfile_${version}_linux_32-bit.tgz standardfile
tar czf standardfile_${version}_linux_32-bit.tar.gz standardfile
rm -f standardfile

mv standardfile-linux-amd64 standardfile
tar czf standardfile_${version}_linux_64-bit.tgz standardfile
tar czf standardfile_${version}_linux_64-bit.tar.gz standardfile
rm -f standardfile

mv standardfile-linux-arm-6 standardfile
tar czf standardfile_${version}_linux_arm6.tgz standardfile
tar czf standardfile_${version}_linux_arm6.tar.gz standardfile
rm -f standardfile

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

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

mv standardfile_${version}* dist/

0 comments on commit ed7196d

Please sign in to comment.