Author Topic: Autoversioning scheme  (Read 6126 times)

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Autoversioning scheme
« 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 ?
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12005
    • Travis build status
Re: Autoversioning scheme
« Reply #1 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
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: Autoversioning scheme
« Reply #2 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
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12005
    • Travis build status
Re: Autoversioning scheme
« Reply #3 on: September 11, 2012, 11:22:51 pm »
<facepalm>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: Autoversioning scheme
« Reply #4 on: September 11, 2012, 11:36:50 pm »
nop
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Autoversioning scheme
« Reply #5 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12005
    • Travis build status
Re: Autoversioning scheme
« Reply #6 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.
« Last Edit: September 12, 2012, 10:34:21 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: Autoversioning scheme
« Reply #7 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: [Select]
//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.
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Autoversioning scheme
« Reply #8 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: [Select]
//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...;

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Autoversioning scheme
« Reply #9 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

Basically it disables auto incrementing the version number if the build num is given zero.

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: Autoversioning scheme
« Reply #10 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...
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]