You are here

Dev Test Numbering: A rant

Gord Caswell's picture
Submitted by Gord Caswell on July 19, 2011 - 1:44am

In the PortableApps.com Format Specification, there is the requirement that the PackageVersion in appinfo.ini is identical to the base app's Package Version. This is as it should be. Accordingly, the DisplayVersion of an app, when officially released, should match as well.

Development Tests of apps being tested for eventual release here, generally have identical Package and display Versions as the base app. This has been all well and good, up until the release and integration of the PortableApps.com Updater into the PortableApps.com Platform.

Now, there is a problem. Allow me to explain:

ProjectA is being tested for release here. The base app of ProjectA is at version 1.0 (which can be expanded to 1.0.0.0).

The developer of the portable package has gone through 3 development tests, and has the following information in the appinfo.ini:

PackageVersion=1.0.0.0
DisplayVersion=1.0 Dev Test 3

This app is now deemed ready for release, and is packaged up and published. The problem? On official release, the Package Version will match the base app's version, namely 1.0.0.0

The issue here is that someone who has installed the program while it is in beta testing will NOT receive notfication via the PortableApps.com Updater that the app has been updated.

Now, what can be done about this?

It's simple. Decrement the PackageVersion for beta testing, so it can be properly incremented on release. For example:

ProjectA base app = 1.0
ProjectA appinfo.ini values while in beta testing:
PackageVersion=0.99.0.x (x being the dev test number)
DisplayVersion-1.0 Dev Test x
and on release:
PackageVersion=1.0
DisplayVersion=1.0

or for a more complicated example:

ProjectB base app: 3.4.665.388
appinfo.ini beta testing:
PackageVersion=3.3.665388.x
DisplayVersion=3.4.665.388 Dev Test x
on release:
PackageVersion=3.4.665.388
DisplayVersion=3.4.665.388

another way of doing it:

ProjectC base app: 3.0.1.3
appinfo.ini beta:
PackageVersion=3.0.0.13x
DisplayVersion=3.0.1.3 Dev Test x
on release:
PackageVersion=3.0.1.3
DisplayVersion=3.0.1.3

and for an app with 3 numbers in the release scheme:

ProjectD base app: 0.8.10
appinfo.ini beta:
PackageVersion=0.8.9.99x
DisplayVersion=0.8.10 Dev test x
on release:
PackageVersion=0.8.10
DisplayVersion=0.8.10

NOTE: Any similarity to actual advice I have previously given is fully intentional.

Any comments or thoughts?

Comments

I think this should be included in somewhere in the Development section. It is quite reasonable, thanks for the advice (formerly given, since I took it into account in my latest dev tests). Smile

Chris Morgan's picture

In the PortableApps.com Format Specification, there is the requirement that the PackageVersion in appinfo.ini is identical to the base app's Package Version. This is as it should be. Accordingly, the DisplayVersion of an app, when officially released, should match as well.

There is no such requirement. What do you mean by it, anyway?

Using a lower PackageVersion is currently the way to do it. It's just not well advertised.

What I myself have been doing is this:

  • For a one- or two-part version number:
    • Development Test: subtract one from part 2 with take, set part 3 to 80 and part 4 to N.
    • Pre-Release: subtract one from part 2 with take, set part 3 to 90 and part 4 to N.
    • Revision: set part 4 to the revision number.

    Note that the maximum used by "take" will vary based on the earlier app numbers - 1.0 might go to 0.9, or it might go to 0.99, or 0.9999 if there had been an actual release 0.1234.

  • For a three-part version number:
    • Development Test: subtract one from part 3 and set part 4 to 80 + N.
    • Pre-Release: subtract one from part 3 and set part 4 to 90 + N.
    • Revision: set part 4 to the revision number.
  • For a four-part version number:
    • Development Test: subtract one from part 4, multiply by 100 and add 80 + N.
    • Pre-Release: subtract one from part 4, multiply by 100 and add 90 + N.
    • Release: multiply part 4 by 100.
    • Revision: multiply part 4 by 100 and N.

(Reminders: Development Tests start at 1, Pre-Releases at 1, Revisions at 2.)

If the spec remains the same, I intend to build this into PADT, possibly replacing the 1-2 part treatment with the 3 part treatment.

----

Other ideas:

I have a few other notions which I think are better.

  1. Make PackageVersion be based solely upon the base app version and use another key in [Version] for managing updates; let's call it "PublishVersion". This could then take a few forms:

    1. Increment it with every new release with the same base app version. So 1.0dt1 is 1, 1.0dt2 is 2, 1.0.1dt1 is 1, 1.0.1pr1 is 2, 1.0.1 is 3, 1.0.1rev2 is 4, 1.0.2 is 5.

      Disadvantage: wouldn't cope well with downgrading the base app.

    2. Increment it with every new release of a portable version. So 1.0dt1 is 1, 1.0dt2 is 2, 1.0.1dt1 is 1, 1.0.1pr1 is 2, 1.0.1 is 3, 1.0.1rev2 is 4, 1.0.2 is 5. Roll back to 1.0.1rev2 (1.0.1rev3) and it's 6.

      Advantage: could cope with downgrading.
      Disadvantage: release early, release often, get a big number. Might not seem quite so pleasant after a while.

    3. A variant: UpdateDate is going into Update.ini, it could go into appinfo.ini too.

      Advantages: could cope with downgrading if used solely, and adds a bit of information which could potentially be useful.
      Disadvantage: if used solely, doesn't work well with multiple releases on one day.

  2. Make PackageVersion be based solely upon the base app version and use DisplayVersion. Consider how Linux distributions tend to have quite involved numbering schemes; 1.0-0, 1.0-1, 1.0.1~rc1, 1.0+2, 1.3-1ubuntu4, 1.3-1ubuntu4.1, et cetera. They have a very rich (and potentially confusing) set of things to base it upon. But it is all well defined and you can work out whether a given version string is greater or less than another version string. Their vocabulary could be adapted so that DisplayVersion was used for comparison. Then PackageVersion would become irrelevant, only used for the installer executable version number.

    A variant of this which could work better in some cases (base app version strings could get messy), and is probably thus more desirable, would be to use PackageVersion to identify the base app version and add the PortableApps.com information from DisplayVersion ("Dev Test N", "Pre-Release N", "", "Revision N") to it for comparison.

    Advantage: uses existing information. No changes beyond Platform/Updater/Updater.ini.
    Disadvantage: won't cope with downgrading.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

In my opinion, its not necessary to add another [Version], only make it more complicated. But downgradeability should be preserved as sometimes updates go wrong.

Why not have DisplayVersion as is and use PackageVersion as suggested by Chris? I think its reasonable and not too difficult for Developers.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

I kinda think you're overthinking the whole thing, and using the version numbers to do too much.
Pardon me if I missed one or two points, but I think there should be a simpler solution.
Beta testers want to have the updater take you from a DevTest to the Release when it comes out, but the updater only checks the PackageVersion when notifying of an update, so you can't have the release PackageVersion the same as the DevTest PackageVersion. Unfortunately, some base apps use all 4 parts of the version number already, so we can't rely on that to denote DevTest unless we actually change the base app version number. Am I right so far?

I like the idea of a separate key in the [Version] section. This could be something like "DevNum". During the the development cycle, it could be any alphanumeric, like dt1 or rc5 (I defer to those wiser than me to set the actual numbering rules). When the real deal Release version is released, this key would then have to be empty.

How would this help?
The updater checks against the PackageVersion AND to see if there is any value in "DevNum". If the PackageVersion is the same as the one in the repository, and "DevNum" has a value, it notifies you of an update.

Of course this would require changes to the updater and installer to cope with the new key.

Edit: Reworded to clarify (I hope).

I made this half-pony, half-monkey monster to please you.

John T. Haller's picture

We just use the PackageVersion. If the dev does it proper and uses a lesser PackageVersion than what final we be, cool. If not, we just update it to one higher (e.g. even if an app is 1.2.3, the PackageVersion could be 1.2.3.1 instead of 1.2.3.0, same as if we did a Rev 1 of the app). As PackageVersion is only used internally and has no affect on the app or user other than use in the updater, it's no big deal.

Devs *should* be following some pattern of having the packageversion less than it will be than when it goes official, though, to keep things neat.

Sometimes, the impossible can become possible, if you're awesome!

I use the first 3 parts as the base app version and the fourth part is the portabilization code version so if only the base app changes the fourth part stays the same. Examples below.

App 4.496.1135 portable code 4 get 4.496.1135.4
if the App updates to 4.496.1200 but does not require changes to the portablization it gets 4.496.1200.4
if it then turns out it actually did need a change to the portability code or a new feature in the launcher comes out that I need to configure to improve usability while the app has not been updated it would get 4.496.1200.5

using this model when it becomes a full release it will recieve a new splash screen which is part of the portability code meaning that the fourth part will then be incremented so if the last example number was the final dev test then the first full release would be 4.496.1200.6

if the base app used four sections I would remove one of the seperators and keep all digits the same in the same order such as app 1.2.3.4 would end up 1.2.34.1 for the first portability code version.

I see this as the most efficient and accurate numbering method available I have used it with the only portable app I made and will also use it for any other apps I make in the future while any nonportable programs I make will always only use 3 sections so that portablized versions can use this system.

Pyromaniac's picture

I thought that the updater always updated dev tests up to official releases when they become official. I mean, I used the full version number in PackageVersion, and the first 2 or 3 numbers then Dev Test x (as you did way at the top) and they always updated my apps like a charm.

What's wrong with keeping it that way, if it's been working fine till now. The official version can't accidentally downgrade to the beta version anyway because the links are different.