Proposal: changes to version.IsDev
Tim Penhey
tim.penhey at canonical.com
Thu Mar 21 21:33:46 UTC 2013
Hi again...
// IsDev returns whether the version represents a development
// version. A version with an odd-numbered major, minor
// or patch version is considered to be a development version.
func (v Number) IsDev() bool {
return isOdd(v.Major) || isOdd(v.Minor) || isOdd(v.Patch) || v.Build > 0
}
To me this seems a little extreme.
In other projects I have worked on, an odd minor version number is
sufficient to say that something is a development version. Not any odd
number.
This would mean:
2.0.0 - is a release
2.1.0 - is a development version
2.2.1 - would become a released version (2.2 with a patch)
3.0.0 - would be a release version
So.. proposal would be to simplify the function to be:
func (v Number) IsDev() bool {
return isOdd(v.Minor) || v.Build > 0
}
Any objections?
Tim
More information about the Juju-dev
mailing list