Skip to content
Simon Caplette edited this page Apr 13, 2018 · 16 revisions

Binaries release

Here are the steps to perform the Github release containing the binaries. Let us say we are releasing v0.1.10

  1. Performs the following commands
$ cd awless
$ git pull
# Edit the CHANGELOG.md to change the unreleased key word to the current date
$ vim CHANGELOG.md 
# Edit and bump the code version to v0.1.10
$ vim config/version.go
$ git commit -m "Bumping version before release"
# List all current tags (i.e. released version)
$ git tag 
$ git tag v0.1.10
$ go run release.go -tag v0.1.10
# If all went well in the above steps
$ git push --tags
  1. On Github do a "New Draft Release" and fill in the draft following the format of preceding releases. Most importantly copy/paste the CHANGELOG.md section of the release

  2. Drag and drop to the "Draft Release" all the binaries built in the previous step.

  3. Publish the Draft Release

Brew release

Prerequisite

You need use macOS and install brew

Clone awless' homebrew repository on github in /usr/local/Homebrew/Library/Taps/wallix/ (first create this folder if necessary):

$ cd /usr/local/Homebrew/Library/Taps/wallix
$ git clone [email protected]:wallix/homebrew-awless.git

Build homebrew bottle for a new version

$ cd /usr/local/Homebrew/Library/Taps/wallix/homebrew-awless/

Edit the formula to update the version to release:

$ vim Formula/awless.rb
...
version = "v0.1.10" # -> Increment this line to the version to release
...

Build the bottle with the new version in the folder of your choice (here in ~/Downloads)

$ cd ~/Downloads && brew uninstall awless && brew install --build-bottle awless && brew bottle awless
...
bottle do
  cellar :any_skip_relocation
  rebuild 1
  sha256 "84c4c0f571279870ce6e6a31c6fa4babc0fb58d3afbd4781ddbce12a7fa0a53a" => :sierra
end

Copy the result sha256 in the output of the previous command: (here: 4587e2e11e297107702258808ae7dacf2b97c8f41c621e24131748c0b61d66ee) and put it in the homebrew formula:

$ cd /usr/local/Homebrew/Library/Taps/wallix/homebrew-awless/
$ vim Formula/awless.rb
...
bottle do
  root_url "https://github.com/wallix/homebrew-awless/releases/download/#{version}"
  cellar :any_skip_relocation
  sha256 "4587e2e11e297107702258808ae7dacf2b97c8f41c621e24131748c0b61d66ee" => :sierra # Replace here the sha256 by the one of the new version.
end
...

You can now commit this new version of the formula, create the appropriate tag and push to github:

$ git commit -a -m "update awless to v0.1.10"
$ git tag v0.1.10
$ git push origin master
$ git push --tags

Create a new release for homebrew-awless on Github.

  • Select the appropriate tag (here v0.1.10).
  • Release name: "Release 0.1.10"
  • Drop the release file produced by brew bottle awless (here stored in ~/Downloads/awless-0.1.10.sierra.bottle.tar.gz) in the appropriate zone.

You can now publish the release and test that everything has worked as expected:

$ brew uninstall awless; brew install awless
...
==> Downloading from https://github-production-release....
...
Clone this wiki locally