Browse Source
Clean up build.sh and build for linux/arm64 (#158)
Clean up build.sh and build for linux/arm64 (#158)
* Clean up build.sh and build for linux/arm64pull/160/head
mutantmonkey
6 years ago
committed by
Andrei Marcu
1 changed files with 57 additions and 84 deletions
-
141build.sh
@ -1,94 +1,67 @@ |
|||
#!/bin/bash |
|||
|
|||
version="$1" |
|||
mkdir -p "binairies/""$version" |
|||
name="binairies/""$version""/linx-server-v""$version""_" |
|||
|
|||
GOOS=darwin GOARCH=amd64 go build -o "$name"osx-amd64 |
|||
rice append --exec "$name"osx-amd64 |
|||
|
|||
GOOS=darwin GOARCH=386 go build -o "$name"osx-386 |
|||
rice append --exec "$name"osx-386 |
|||
|
|||
GOOS=freebsd GOARCH=amd64 go build -o "$name"freebsd-amd64 |
|||
rice append --exec "$name"freebsd-amd64 |
|||
|
|||
GOOS=freebsd GOARCH=386 go build -o "$name"freebsd-386 |
|||
rice append --exec "$name"freebsd-386 |
|||
|
|||
GOOS=openbsd GOARCH=amd64 go build -o "$name"openbsd-amd64 |
|||
rice append --exec "$name"openbsd-amd64 |
|||
|
|||
GOOS=openbsd GOARCH=386 go build -o "$name"openbsd-386 |
|||
rice append --exec "$name"openbsd-386 |
|||
|
|||
GOOS=linux GOARCH=arm go build -o "$name"linux-arm |
|||
rice append --exec "$name"linux-arm |
|||
|
|||
GOOS=linux GOARCH=amd64 go build -o "$name"linux-amd64 |
|||
rice append --exec "$name"linux-amd64 |
|||
|
|||
GOOS=linux GOARCH=386 go build -o "$name"linux-386 |
|||
rice append --exec "$name"linux-386 |
|||
function build_binary_rice { |
|||
name="$1" |
|||
|
|||
for arch in amd64 386; do |
|||
GOOS=darwin GOARCH=$arch go build -o "$name"osx-$arch |
|||
rice append --exec "$name"osx-$arch |
|||
done |
|||
|
|||
for arch in amd64 386; do |
|||
GOOS=freebsd GOARCH=$arch go build -o "$name"freebsd-$arch |
|||
rice append --exec "$name"freebsd-$arch |
|||
done |
|||
|
|||
for arch in amd64 386; do |
|||
GOOS=openbsd GOARCH=$arch go build -o "$name"openbsd-$arch |
|||
rice append --exec "$name"openbsd-$arch |
|||
done |
|||
|
|||
for arch in arm arm64 amd64 386; do |
|||
GOOS=linux GOARCH=$arch go build -o "$name"linux-$arch |
|||
rice append --exec "$name"linux-$arch |
|||
done |
|||
|
|||
for arch in amd64 386; do |
|||
GOOS=windows GOARCH=$arch go build -o "$name"windows-$arch.exe |
|||
rice append --exec "$name"windows-$arch.exe |
|||
done |
|||
} |
|||
|
|||
function build_binary { |
|||
name="$1" |
|||
|
|||
for arch in amd64 386; do |
|||
GOOS=darwin GOARCH=$arch go build -o "$name"osx-$arch |
|||
done |
|||
|
|||
for arch in amd64 386; do |
|||
GOOS=freebsd GOARCH=$arch go build -o "$name"freebsd-$arch |
|||
done |
|||
|
|||
for arch in amd64 386; do |
|||
GOOS=openbsd GOARCH=$arch go build -o "$name"openbsd-$arch |
|||
done |
|||
|
|||
for arch in arm arm64 amd64 386; do |
|||
GOOS=linux GOARCH=$arch go build -o "$name"linux-$arch |
|||
done |
|||
|
|||
for arch in amd64 386; do |
|||
GOOS=windows GOARCH=$arch go build -o "$name"windows-$arch.exe |
|||
done |
|||
} |
|||
|
|||
GOOS=windows GOARCH=amd64 go build -o "$name"windows-amd64.exe |
|||
rice append --exec "$name"windows-amd64.exe |
|||
|
|||
GOOS=windows GOARCH=386 go build -o "$name"windows-386.exe |
|||
rice append --exec "$name"windows-386.exe |
|||
version="$1" |
|||
mkdir -p "binaries/""$version" |
|||
|
|||
build_binary_rice "binaries/""$version""/linx-server-v""$version""_" |
|||
|
|||
cd linx-genkey |
|||
name="../binairies/""$version""/linx-genkey-v""$version""_" |
|||
|
|||
GOOS=darwin GOARCH=amd64 go build -o "$name"osx-amd64 |
|||
|
|||
GOOS=darwin GOARCH=386 go build -o "$name"osx-386 |
|||
|
|||
GOOS=freebsd GOARCH=amd64 go build -o "$name"freebsd-amd64 |
|||
|
|||
GOOS=freebsd GOARCH=386 go build -o "$name"freebsd-386 |
|||
|
|||
GOOS=openbsd GOARCH=amd64 go build -o "$name"openbsd-amd64 |
|||
|
|||
GOOS=openbsd GOARCH=386 go build -o "$name"openbsd-386 |
|||
|
|||
GOOS=linux GOARCH=arm go build -o "$name"linux-arm |
|||
|
|||
GOOS=linux GOARCH=amd64 go build -o "$name"linux-amd64 |
|||
|
|||
GOOS=linux GOARCH=386 go build -o "$name"linux-386 |
|||
|
|||
GOOS=windows GOARCH=amd64 go build -o "$name"windows-amd64.exe |
|||
|
|||
GOOS=windows GOARCH=386 go build -o "$name"windows-386.exe |
|||
|
|||
build_binary "../binaries/""$version""/linx-genkey-v""$version""_" |
|||
cd .. |
|||
|
|||
|
|||
cd linx-cleanup |
|||
name="../binairies/""$version""/linx-cleanup-v""$version""_" |
|||
|
|||
GOOS=darwin GOARCH=amd64 go build -o "$name"osx-amd64 |
|||
|
|||
GOOS=darwin GOARCH=386 go build -o "$name"osx-386 |
|||
|
|||
GOOS=freebsd GOARCH=amd64 go build -o "$name"freebsd-amd64 |
|||
|
|||
GOOS=freebsd GOARCH=386 go build -o "$name"freebsd-386 |
|||
|
|||
GOOS=openbsd GOARCH=amd64 go build -o "$name"openbsd-amd64 |
|||
|
|||
GOOS=openbsd GOARCH=386 go build -o "$name"openbsd-386 |
|||
|
|||
GOOS=linux GOARCH=arm go build -o "$name"linux-arm |
|||
|
|||
GOOS=linux GOARCH=amd64 go build -o "$name"linux-amd64 |
|||
|
|||
GOOS=linux GOARCH=386 go build -o "$name"linux-386 |
|||
|
|||
GOOS=windows GOARCH=amd64 go build -o "$name"windows-amd64.exe |
|||
|
|||
GOOS=windows GOARCH=386 go build -o "$name"windows-386.exe |
|||
|
|||
build_binary "../binaries/""$version""/linx-cleanup-v""$version""_" |
|||
cd .. |
Write
Preview
Loading…
Cancel
Save
Reference in new issue