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

Make the release available

Once you have perform the Binaries and Brew releases (see below), you have to update the awless update server so that current regular users get notified that a new version is available.

To modify the version broadcasted on the update server you need to be able to SSH to it:

$ awless ssh awless-updates
# Then update the version and restart the service
ubuntu@awless-metrics-dev:~$ sudo vim goapps/awless-services/version.json
ubuntu@awless-metrics-dev:~$ sudo systemctl restart awless-metrics

Details on the update server as of 13-04-2018 are:

KeyPair awless-metrics-dev
Name awless-updates
Private IP 172.31.44.130
Public IP 34.249.239.216
PublicDNS ec2-34-249-239-216.eu-west-1.compute.amazonaws.com
SecurityGroups [sg-9e3bb9f8]
State running
Subnet subnet-267d517f
Type t2.medium
Uptime 16 months
Vpc vpc-00b68c65
Zone eu-west-1c

Binaries release

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

  1. First performs the following commands on your local repo
$ 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 git@github.com: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