Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 32 bit builds #94

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ install:
script:
- go test -v -cover ./...
- for os in linux darwin windows openbsd; do echo "building for $os" && env GOOS="$os" go build -o /dev/null; done
- ./build-releases.sh
- if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "$TRAVIS_BRANCH" != "master" ]; then ./build-releases.sh; fi
16 changes: 5 additions & 11 deletions build-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

set -euo pipefail

# only build on master
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "$TRAVIS_BRANCH" != "master" ]; then
echo "Not building release, this is a pull request"
exit 0
fi

# get hub if we don't have it
if ! command -v hub > /dev/null 2>&1 ; then
go get github.com/github/hub
Expand All @@ -31,14 +25,14 @@ readonly bin_name="$project"
readonly message="Automatic build"

declare -A arch_for_os
arch_for_os["darwin"]="amd64"
arch_for_os["windows"]="amd64"
arch_for_os["linux"]="amd64 arm64 ppc64 ppc64le mips64 mips64le s390x"
arch_for_os["openbsd"]="amd64"
arch_for_os["darwin"]="386 amd64"
arch_for_os["windows"]="386 amd64"
arch_for_os["linux"]="386 amd64 arm arm64 ppc64 ppc64le mips mipsle mips64 mips64le s390x"
arch_for_os["openbsd"]="386 amd64 arm"

# create the release and upload artifacts
hub release create $release_flags --message="$message" --commitish="$head_commit" "$tag"
for os in darwin linux windows openbsd; do
for os in "${!arch_for_os[@]}" ; do
for arch in ${arch_for_os["$os"]}; do
archive_name="$project-$os-$arch.tar.gz"
echo "Building $project for $os on $arch"
Expand Down