Defined Hooks
Context hook runners
These run within the current project regardless of where Zesk Build is loaded:
hookVersionCurrent
Application current version
Usage
hookVersionCurrent [ --help ] [ --application application ]
Get the application's current version.
Wrapper for the hook version-current.
Extracts the version from the repository
Location:
bin/build/tools/hooks.sh
Arguments
--help- Flag. Optional. Display this help.--application application- Directory. Optional. Application home directory.
Return codes
0- Success1- Environment error2- Argument error
hookVersionLive
Application deployed version
Usage
hookVersionLive [ --help ] [ --application application ]
Get the application's deployed (e.g. live and published) version.
Wrapper for the hook version-live.
Location:
bin/build/tools/hooks.sh
Arguments
--help- Flag. Optional. Display this help.--application application- Directory. Optional. Application home directory.
Return codes
0- Success1- Environment error2- Argument error
hookNotify
Send a notification
Usage
hookNotify [ --sound soundName ] [ --tags tagList ] [ --priority priority ] [ --title title ] [ --help ] [ --application application ]
Send a notification.
Wrapper for the hook notify.
Location:
bin/build/tools/hooks.sh
Arguments
--sound soundName- String. Optional. Sound name to play. Depends on context of notification.--tags tagList- CommaDelimitedList. Optional. Tags for notification. e.g.warning,production--priority priority- String. Optional. Priority of the notification.low, orhigh--title title- String. Optional. Title of the notification.--help- Flag. Optional. Display this help.--application application- Directory. Optional. Application home directory.
Return codes
0- Success1- Environment error2- Argument error
Application hooks
{__hookNotify}
{__hookDocumentationComplete}
{__hookDocumentationError}
Version hooks
These hooks interact with release-new.sh and deployment tools but are intended to be used anywhere.
version-current- Required. The current version. Defaults to the highest version indocs/release.version-live- Optional. Determine the live version.version-created- Optional. Run when a new version is created.version-already- Optional. Run when a new version is requested, but it already exists in the source code.
{__hookVersionAlready}
{__hookVersionCreated}
{__hookVersionCurrent}
{__hookVersionLive}
Application Hooks
{__hookApplicationEnvironment}
{__hookApplicationFiles}
{__hookApplicationEnvironment}
{__hookApplicationID}
{__hookApplicationTag}
{__hookMaintenance}
Development Hooks
{__hookProjectActivate}
{__hookProjectActivate}
Deployment Hooks
{__hookApplicationEnvironment}
{__hookApplicationID}
{__hookApplicationTag}
{__hookMaintenance}
{__hookDeployStart}
{__hookDeployMove}
{__hookDeployConfirm}
{__hookDeployCleanup}
{__hookDeployFinish}
{__hookDeployRevert}
Git hooks
Pre-commit
{__hookGitPreCommit}
{__hookPreCommitShell}
{__hookPreCommitPHP}
Post-commit
{__hookGitPostCommit}
Test Hooks
{__hookTestSetup}
{__hookTestRunner}
{__hookTestCleanup}