github.com/qxnw/lib4go@v0.0.0-20180426074627-c80c7e84b925/archiver/build.bash (about)

     1  #!/usr/bin/env bash
     2  set -ex
     3  
     4  # This script builds archiver for most common platforms.
     5  
     6  export CGO_ENABLED=0
     7  
     8  cd cmd/archiver
     9  GOOS=linux   GOARCH=386   go build -o ../../builds/archiver_linux_386
    10  GOOS=linux   GOARCH=amd64 go build -o ../../builds/archiver_linux_amd64
    11  GOOS=linux   GOARCH=arm   go build -o ../../builds/archiver_linux_arm7
    12  GOOS=linux   GOARCH=arm64 go build -o ../../builds/archiver_linux_arm64
    13  GOOS=darwin  GOARCH=amd64 go build -o ../../builds/archiver_mac_amd64
    14  GOOS=windows GOARCH=386   go build -o ../../builds/archiver_windows_386.exe
    15  GOOS=windows GOARCH=amd64 go build -o ../../builds/archiver_windows_amd64.exe
    16  GOOS=freebsd GOARCH=386   go build -o ../../builds/archiver_freebsd_386
    17  GOOS=freebsd GOARCH=amd64 go build -o ../../builds/archiver_freebsd_amd64
    18  GOOS=freebsd GOARCH=arm   go build -o ../../builds/archiver_freebsd_arm7
    19  GOOS=openbsd GOARCH=386   go build -o ../../builds/archiver_openbsd_386
    20  GOOS=openbsd GOARCH=amd64 go build -o ../../builds/archiver_openbsd_amd64
    21  cd ../..