Page 1 of 1

Version number listing required

PostPosted: Mon Feb 27, 2012 15:04
by J0nnJ0nes
There needs to be a way to retrieve the correct minetest version, particularly for uses in external scripts and programs (In this case, a mod manager for minetest). I think a "minetest --version" option would be enough.

For that matter, how would you go about getting a mod's version as well? Standardizing a variable to do so, required for every mod to have somewhere? If not, then what would it take?

P.S. I remember fixing this exact post because of the bug, as usual. Maybe not :-/.

PostPosted: Mon Feb 27, 2012 22:38
by tinoesroho
Truncated post bug. Please repost.

Wouldn't simply placing version.txt in minetest/bin/ be enough?

PostPosted: Tue Feb 28, 2012 14:41
by J0nnJ0nes
Most programs have a --version. Creating a text file each time would work too. Just something to tell the version.

PostPosted: Tue Feb 28, 2012 16:37
by randomproof
I shouldn't be to hard to add a function such as:
major, minor, build = mintest.get_version()
So the version of the program I have now is "0.4.dev-20120122-1" therefore:
major = 0
minor = 4
build = dev-20120122-1