Use latest tag when building from master

When building from 'master' (the production branch), then we want to use
the latest tag as our version. Master is expected to only contain
commits from proper releases.