Log in

View Full Version : Product Manager - Version Management?


Link14716
07-27-2005, 06:44 PM
How does the Product Manager deal with version management? Anyone know before I rip through the file? ;)

Andreas
07-27-2005, 06:55 PM
adminfunctions_template.php, is_newer_version()

Basically, it checks the installed Version and executes all Install Codes that carry Version Numbers higher then the one installed in ascending order.

When uninstalling, it tries to execute all uninstall Codes in descending order.

Link14716
07-27-2005, 07:14 PM
Looks like I'm going to have to go through the code to find ways around that, then.

Andreas
07-27-2005, 07:16 PM
Erm, may I ask why you have to "find ways around that"?
IMHO that does not make sense.

Link14716
07-27-2005, 07:20 PM
Well, I don't want it to execute all the install/uninstall codes for all versions - that doesn't make sense. That's like saying that vBulletin should install vB1 and upgrade all the way to 3.5.0.

Andreas
07-27-2005, 07:26 PM
That's the way incremental updates do always work :)

If you are upgrading let's say vB 3.0.0 it will upgarade to .1, .2, .3, .. and so on until it reaches 3.0.7

This makes it easy, otherwise you would have to create "full" and "update" installation codes, which is also possible - just delete all except one and place all codes there.

Link14716
07-27-2005, 07:38 PM
All I was saying is that I would have to look through and see what variables are being used to make sure only certain code is executed during upgrades and different is executed during installation. Uninstallation would be handled by just having the most recent code there.

Understand? ;)

Andreas
07-27-2005, 07:42 PM
I don't get it, sorry.
Anyay, I am sure you will achieve what you want :)

Marco van Herwaarden
07-27-2005, 08:14 PM
This will also mean that we can only use numbers in a fixed lenght for the version?

I mean no 'v1.0.1 Beta1', but only 01010101 or something?

Andreas
07-27-2005, 08:25 PM
* Converts a version number such as 3.0.0 Beta 6 into an integer for comparison purposes
*
* Example:
* 3.0.0 beta 6
* (main version: 3.0.0, sub version: beta, sub release: 6)
* returns an integer like this:
* (main version){5,}(sub version){1}(sub release){2}
* Main version is sub divided to \d+?\d{2}\d{2} .
*
* Supports versions such as 3.99.99 beta 99 too.
* Direct comparison between versions integers is possible.



Sub Version accepts Alpha, Beta, Gamma, Relase Candidate, Gold, Stable, Final and Patch Level (as well as some abbreviations for those).
Gold, Stable and Final are the same.

Marco van Herwaarden
07-27-2005, 08:28 PM
Ahh nice