| | |
Adding version number to builds
![]() |
Hello,
I have a project that I can build with a script. I'd like to add version number + release number to my builds. I'm looking for a way to do it automatically. As a result I'd like to get something like that:
When I run exe I'd like it to know that its version is 1.2.3.
1.2 is the actual version that I can setup manually, but .3 I'd like to change every time I run the deployment script, and it should reset when the version changes. I can write a perl script that reads a file and applies proper changes. But maybe there is a standard way to do these things and I'm not aware of it.
Thanks.
I have a project that I can build with a script. I'd like to add version number + release number to my builds. I'm looking for a way to do it automatically. As a result I'd like to get something like that:
\deployment\v1.2.3\some.exeWhen I run exe I'd like it to know that its version is 1.2.3.
1.2 is the actual version that I can setup manually, but .3 I'd like to change every time I run the deployment script, and it should reset when the version changes. I can write a perl script that reads a file and applies proper changes. But maybe there is a standard way to do these things and I'm not aware of it.
Thanks.
Regards, Alexander. http://sjcomp.com
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
Hey There,
If you use cvs, it will update the minor revision by default every time you check the code out and check it back in.
Ex:
Of course, you'd have to login, etc, first.
If you're using this already it's a good "incidental" feature and you could still force your version tags if you wanted to.
Here's a fairly decent link to tagging with cvs (The main cvs page can be found on Sourceforge.net)
http://www.linux.ie/articles/tutoria...tinuingcvs.php
Hope that helps
, Mike
If you use cvs, it will update the minor revision by default every time you check the code out and check it back in.
Ex:
mkdir -p /var/tmp/build cd /var/tmp/build cvs co PROJECT_NAME cvs update -q <--- if you have this directory already and just want to update cvs ci/update/add
Of course, you'd have to login, etc, first.
If you're using this already it's a good "incidental" feature and you could still force your version tags if you wanted to.
Here's a fairly decent link to tagging with cvs (The main cvs page can be found on Sourceforge.net)
http://www.linux.ie/articles/tutoria...tinuingcvs.php
Hope that helps

, Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
Thanks, eggi.
I'm actually using subversion. And I know that it does have similar option. It looks like I have to use build number, because I can have multiple builds of the code before I commit.
Thanks.
I'm actually using subversion. And I know that it does have similar option. It looks like I have to use build number, because I can have multiple builds of the code before I commit.
Thanks.
Regards, Alexander. http://sjcomp.com
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
No problem,
Check this out. This guy figured out how to use subversion's revision number as your build number
http://www.red-sweater.com/blog/23/a...oning-in-xcode
Best wishes,
Mike
Check this out. This guy figured out how to use subversion's revision number as your build number

http://www.red-sweater.com/blog/23/a...oning-in-xcode
Best wishes,
Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
![]() |
Other Threads in the Shell Scripting Forum
- Previous Thread: Issue with echo $list not working in variable
- Next Thread: shell problem not working!!! :((
| Thread Tools | Search this Thread |





