$upgrade_dir
$upgrade_dir :
Handles all upgrade functions, including create upgrade point, publish, download, install, and rollback.
create(string $pkg_alias,string $version = ''): integer
Create upgrade point
Create a new upgrade point. Upon creation, all files within the package will be hashed, then upon publication, all modified files will be included.
string | $pkg_alias | The alias of the package to create upgrade point for |
string | $version | The version of the upgrade. Optional, if blank increments the third element of the current package version by 1. |
The ID# of the newly created upgrade point
create_file_hash(integer $upgrade_id)
Create SHA1 file hash
Create a SHA1 hash of all files pertaining to the package. This is used for upgrades, as it hashes ( all files upon creating an upgrade point, then checks against the current hashes when publish the upgrade to see which files were modified.
integer | $upgrade_id | The ID# of the upgrade files are being hashed for. |
compile(integer $upgrade_id): \apex\app\pkg\Returns
Compile upgrade
Compiles an upgrade. Goes through the SHA1 hashes created against each file when the upgrade point was created, and determines which components / files have been added, updated, and deleted. Compiles them as necessary to be uploaded to the repository.
integer | $upgrade_id | The ID# from the 'internal_upgrades' file which to compile |
the filename or the zip archive, which is stored in the system tmp directory.
install_from_zip(string $pkg_alias,string $version,string $zip_file)
Install single upgrade from zip file
string | $pkg_alias | The alias of the package upgrade is being installed for |
string | $version | The new version of the zip file |
string | $zip_file | The location of the zip file |