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

Build new releases on merge to master #80

Merged
merged 4 commits into from
Jan 16, 2019
Merged

Conversation

whereswaldon
Copy link
Member

This pull request should configure TravisCI building and publishing a release each time we update the master branch. I have tested it as well as I know how to in an isolated environment. Unfortunately, the only way to see that works for sure is to merge it.

@whereswaldon
Copy link
Member Author

Had to do some updates after posting, but I believe that it will work when we hit merge.

@BitiTiger
Copy link
Contributor

BitiTiger commented Jan 15, 2019 via email

@whereswaldon
Copy link
Member Author

Good suggestion. I'm doing that now

@whereswaldon
Copy link
Member Author

Okay, that testing did reveal a problem in the Travis environment that I didn't anticipate. Thanks @Caton101. Here's an example of a Travis build that built a release using this code.

@BitiTiger
Copy link
Contributor

BitiTiger commented Jan 16, 2019

Making Windows users download 7zip or another archive utility is very funny to me. I think we should use a file format that the native OS can support without any extra tools. For Windows, I suggest using the classic .zip file.

Copy link
Contributor

@jwhett jwhett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. and with passing travis builds to boot!

exit 0
fi

# get hub if we don't have it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get hub <-- this hurt my brain to read

# build pre-release if not on a tag, otherwise build release
if ! git describe --tags --exact-match HEAD > /dev/null 2>&1 ; then
echo "Building pre-release, not tagged commit"
readonly tag="release-$(echo ${head_commit} | head -c 7)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for using readonly

archive_name="$project-$os.tar.gz"
echo "Building $project for $os"
env GOOS="$os" CGO_ENABLED=0 go build -o "$bin_name" &&\
tar czf "$archive_name" "$bin_name" &&\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does mean that you have to install more third-party tools to unpack windows release files. i'm not going to block on this as there are several well-known tools for this and the target audience is sure to know what they are and how to find/install them.

@jwhett
Copy link
Contributor

jwhett commented Jan 16, 2019

@Caton101, I resemble that remark! 😆

@jwhett jwhett merged commit ab3bda6 into master Jan 16, 2019
@BitiTiger
Copy link
Contributor

BitiTiger commented Jan 16, 2019

Should we delete this branch to prevent stale branches?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants