Skip to content

Instantly share code, notes, and snippets.

@gabriel
Last active December 16, 2015 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabriel/a5b2b2b928fd27975f0a to your computer and use it in GitHub Desktop.
Save gabriel/a5b2b2b928fd27975f0a to your computer and use it in GitHub Desktop.

Prereleases

Versioning

We use a semantic versioning string, that looks like 1.2.3 or 1.2.3-400 or 1.2.3-400+comment. After the dash (-) is the "prerelease" info. After the plus (+) is a comment field.

There are two ways to set the build number:

  • By changing DefaultBuild in version.go
  • By setting libkb.CustomBuild ldflag at compile time

For the CustomBuild ldflag, the prerelease scripts use the date format +%Y%m%d%H%M%S so that we can build without having to change the build number and commit changes to the repo.

This date format is meant to be both human readable and an ordered number. (An epoch is ordered and not human readable, and other formats with dashes and dots are not numeric.) For example, 20151215102019 is 12/15/2015 at 10:20:19.

This date format is also the date of the last git commit. And in addition, a comment with a short sha of the last commit is added as well allowing you to pinpoint more easily where in the git history the build was made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment