Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: eranon on September 11, 2012, 08:46:46 pm

Title: Autoversioning scheme
Post by: eranon on September 11, 2012, 08:46:46 pm
I'm testing the autoversioning plugin to decide if I'll use-it for my projects or not, and doesn't understand the scheme choice. Here is my concern :

I'm used to use version number like this : MAJOR.MINOR.REVISION.BUILD (and often presented in a string like "MAJOR.MINOR.REVISION build BUILD")
And I see autoversioning generates version number like this : MAJOR.MINOR.BUILD.REVISION

In the first presentation, the logic is that the parts are ordered according to the frequency of their changes (build is incremented at every building, so the most frequently, and a same revision can require several builds before to be OK).

Could you explain me the logic of the autoversioning plugin here ?
Title: Re: Autoversioning scheme
Post by: oBFusCATed on September 11, 2012, 08:59:57 pm
Look at the code and it will be clear :)
Another option is to read this information in the wiki: http://wiki.codeblocks.org/index.php?title=AutoVersioning_plugin

Also, most of the time this section is meant for questions about plugin's development, not their usage.  :P
Title: Re: Autoversioning scheme
Post by: eranon on September 11, 2012, 09:54:43 pm
Already read the wiki, Obfuscated and there's not the answer about the reason why of this logic (which is different than the "how this logic"). Also, I've posted here because the author could be OK to add an option about logic to use (ie. rev.build or build.rev) : so, my post has potentially an influence on development :P
Title: Re: Autoversioning scheme
Post by: oBFusCATed on September 11, 2012, 11:22:51 pm
<facepalm>
Title: Re: Autoversioning scheme
Post by: eranon on September 11, 2012, 11:36:50 pm
nop
Title: Re: Autoversioning scheme
Post by: scarphin on September 12, 2012, 10:27:05 pm
And I see autoversioning generates version number like this : MAJOR.MINOR.BUILD.REVISION

It doesn't work like this on my machine. You must be doing something wrong.

Btw what happens if the maintainer of the some plugin doesn't maintain it anymore? I'm asking this because once I've submitted a patch to add extra functionality to autoversioning plugin and think it's been long lost in the patch tracker.
Title: Re: Autoversioning scheme
Post by: oBFusCATed on September 12, 2012, 10:30:17 pm
Your patch is not lost but, there is no person to commit it.
I don't know the code, neither do use the plugin, so I can't review the patch.

p.s. probably you can try to contact the maintainer JGM or try with killerbot, both are listed as people who have worked on the code.
Title: Re: Autoversioning scheme
Post by: eranon on September 14, 2012, 01:53:46 am
And I see autoversioning generates version number like this : MAJOR.MINOR.BUILD.REVISION

It doesn't work like this on my machine. You must be doing something wrong.

I've just used the autoversioning plugin delivered in C::B package w/o any change in code and testing with the default options. Here is the useful part of the version.h generated by the plugin :

Code
	//Standard Version Type
static const long VERSION__MAJOR = 1;
static const long VERSION__MINOR = 0;
static const long VERSION__BUILD = 2;
static const long VERSION__REVISION = 7;

//Miscellaneous Version Types
static const long VERSION__BUILDS_COUNT = 1;
#define VERSION__RC_FILEVERSION 1,0,2,7
#define VERSION__RC_FILEVERSION_STRING "1, 0, 2, 7\0"
static const char VERSION__FULLVERSION_STRING[] = "1.0.2.7";

As you can see in VERSION__FULLVERSION_STRING, the parts are sorted with VERSION__REVISION at the end. Well, however, don't worry, I've decided to not use-it.
Title: Re: Autoversioning scheme
Post by: JGM on September 15, 2012, 05:59:16 am
And I see autoversioning generates version number like this : MAJOR.MINOR.BUILD.REVISION

It doesn't work like this on my machine. You must be doing something wrong.

I've just used the autoversioning plugin delivered in C::B package w/o any change in code and testing with the default options. Here is the useful part of the version.h generated by the plugin :

Code
	//Standard Version Type
static const long VERSION__MAJOR = 1;
static const long VERSION__MINOR = 0;
static const long VERSION__BUILD = 2;
static const long VERSION__REVISION = 7;

//Miscellaneous Version Types
static const long VERSION__BUILDS_COUNT = 1;
#define VERSION__RC_FILEVERSION 1,0,2,7
#define VERSION__RC_FILEVERSION_STRING "1, 0, 2, 7\0"
static const char VERSION__FULLVERSION_STRING[] = "1.0.2.7";

As you can see in VERSION__FULLVERSION_STRING, the parts are sorted with VERSION__REVISION at the end. Well, however, don't worry, I've decided to not use-it.

Hi,

I haven't been much active using c++, but maybe creating your own string could work

(if on c++)

std::string mystring;
mystring << VERSION__MAJOR << "." << etc...;
Title: Re: Autoversioning scheme
Post by: scarphin on September 15, 2012, 09:39:15 am
JGM: Any chance for you to review the patch below?

Patch ID: 003210
http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=3210&group_id=5358 (http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=3210&group_id=5358)

Basically it disables auto incrementing the version number if the build num is given zero.
Title: Re: Autoversioning scheme
Post by: eranon on September 15, 2012, 02:05:37 pm
Hi,

I haven't been much active using c++, but maybe creating your own string could work

Thanks for your reaction, JGM, but don't worry, *really*, if I've decided to not use your autoversioning plugin, it's not because of this version string format, but because I prefer to manage my version by hand, unless the build increment that I'll manage through a simple tool called autobuildnumber. So, I'll have a version string like I wish and, separately, SVN to release tagged copies...