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

Pre-built binary releases #28

Open
4 tasks
pop opened this issue Mar 31, 2021 · 0 comments
Open
4 tasks

Pre-built binary releases #28

pop opened this issue Mar 31, 2021 · 0 comments

Comments

@pop
Copy link
Contributor

pop commented Mar 31, 2021

The only way to install aws-creds right now is to manually build a binary.

It'd be much nicer to have releases with pre-built binaries using a script that looks something like this:

#!/bin/bash

# Need to use an older version of go for this release
export PATH=/usr/local/opt/[email protected]/bin:$PATH

# Only supporting amd64 for now
export GOARCH=amd64

# Hard-coding version, could derive from tag
export VERSION=v1.0.6

# Build for all major platforms
for os in $(echo darwin windows linux); do
    # Set the OS for this build
    export GOOS=$os

    # Set the binary name
    export AWS_CREDS_BIN=aws-creds_${VERSION}_${GOOS}_${GOARCH}

    # Debugging output
    echo "Building ${AWS_CREDS_BIN}"

    # Build the binary
    go build \
        -o bin/${AWS_CREDS_BIN} \
        -ldflags "-s -w -X github.com/lob/aws-creds/cmd.version=${VERSION}";
done

# Build shasum file
echo "Building checksums file"
pushd bin
    shasum -a 256 aws-creds_${VERSION}_* > aws-creds_$VERSION.sha256sum
popd

echo "Done"

A few problems with this are that MacOS doesn't like this at all and in fact it bars users from running binaries downloaded form GitHub built this way.

  • Figure out how to successfully build valid MacOS/Linux/Windows binaries.
  • Document how to build the release artifacts.
  • Add the release artifact builder to the repo.
  • Automate build + release steps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant