LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Versioning software (https://www.linuxquestions.org/questions/programming-9/versioning-software-835832/)

madsovenielsen 10-02-2010 02:12 PM

Versioning software
 
Hello.

I am working on some minor programming projects. and wouldt like to keep track of them by version numbers. E.g. 1.0.0

Is there a tool or other method for automatically assigning version numbers to software ?

I am currently using Mercurial. as far as i can see it only assigns revision numbers. E.g. 5

Any input wouldt be greatly appriciated.

/mads

harry edwards 10-02-2010 02:34 PM

I'm sure you could use the commit hooks of SVN. May be apply tag the code as part of a post commit hook.

madsovenielsen 10-02-2010 02:47 PM

I wouldt very much like to do it with Mercurial - if possible

graemef 10-02-2010 08:19 PM

First I would say that there is a difference between revisions and versions. A version consists of a variable number of revisions and there is no clear cut way of knowing automatically when you will change from a bug fix to a minor or to a major version. So this is something that you will have to decide upon rather than relying on an automated or semi-automated solution.

Second does your code need to know the version number? Such as a response to a --version switch or in an about box? Or in deciding which files or libraries it should be working with? If that is the case then you will need to have the version number embedded within the source code not in some external repository.

My recommendation would be to use a constant within the code to hold the version number.


All times are GMT -5. The time now is 07:51 PM.