Creating a cPAddon Upgrade
An upgrade is a new version of a script. This new version should be created similar to the original cPAddon version of your script. The only differences should be the differences in your code for the script.
To release
Foo 1.2, we simply:
- Create
Foo 1.2 just like we would a new cPAddon.
- Make
Foo/upgrade/ if it does not exist already.
- Make
Foo/upgrade/1.0_1.2/ ("old version", underscore, "new version"). This directory can have the following case-sensitive files:
- diff — This is the only required file and it is simply a patch from the command:
diff -aruN Foo_1.0.work/ Foo_1.2.work/
-
Note: The directory needs to be the path you actually put in the tarball (*.tar.gz). So, if you made the tarball from Foo_1.0/public_html/, you will need to do the diff on Foo_1.0/public_html.
- mysql — Should contain any SQL needed to upgrade. You should use a variable like
Foo/1.2.mysql
- chmod — If
diff creates files and you need to=chmod= them, list them here. Format is "700 file" per line (i.e., "mode file" where file is relative to install directory)
- remove — This should list files that are in the old version but not in the new version, one per line, that need to be deleted.
- Remove
Foo/1.0.*
There is only the need to create an upgrade from the previous version to the latest. So if
1.4 came out we'd make upgrade
/1.2_1.4/ and any
1.0 installs would be upgraded to
1.4 by way of it following the upgrade path of
1.0 to
1.2, then
1.2 to
1.4.
Topic revision: r8 - 17 Aug 2011 - 15:26:14 - Main.JustinSchaefer
CpanelAddons.CreatingUpgrades moved from Sandbox.CreatingUpgrades on 18 May 2009 - 17:05 by Main.JustinSchaefer