Closed prisae closed 3 years ago
I just added this to the Julia code in 6f41b801d337e0860c97757ec22abe5713912df5
After spending the last 25+ years in Fortran and MATLAB, it's nice to be able to write one liners like this:
version = split(read(`git describe --tags`,String),"-")[1][2:end]
Nice. I definitely didn't optimize that :-) I have to say that my str/regexp capabilities are way behind my numpy capabilities...
However, it takes only care of releases, not of the dev-part above (which is OK for what we discussed for the Julia build).
To streamline with other packages we should use simply
git describe
to get the version number:The implementation is
What it does:
v
, as Python wants a pure semantic number.E.g.:
v0.0.4
=>0.0.4
.dev
-just for test releases to TestPyPI (does not accept hyphens as comes fromgit describe
); cuts the hash.E.g.
v0.0.4-5-gc821797
=>0.0.4.dev5