Use "1" for tagged builds, and "0.datestamp.githash" for master builds. New versions will looks like: 2.0.7-0.datetime1.githash 2.0.7-0.datetime2.githash 2.0.7-0.datetime3.githash 2.0.7-1 2.0.8-0.datetime4.githash This makes any tagged release newer than all previous builds, and master build made after the tag newer then any older tagged releases. This requires bumping the version right after releasing, which is my favorite way. Change-Id: I354646699186fdb87c2f5b26303a0c926bb08d51 Signed-off-by: Nir Soffer <nsoffer@redhat.com>