ePages 7.25.0 - DE_EPAGES/Installer/API/GitPatchBuilder.pm

Package DE_EPAGES::Installer::API::GitPatchBuilder

this module generates the whole patch for a new epages release starting with version specific changes, adding Jira Tasks version control branching cartridge patch building language pack patch building patch package building

Functions

addCartridgePmToGit
addPatchFolderToGit
checkoutTargetBranch
commitChangesToBranch
exportGitReleaseFolders
new
printMessage

addCartridgePmToGit

add Cartridge.pm to CommitBranch

Syntax
$self->addCartridgePmToGit($CartridgePath, $CommitBranch)
Input
$CartridgePath (string)
path to specified Cartridge
$CommitBranch (string)
current branch

addPatchFolderToGit

add all files under ../Patch_Version to CommitBranch

Syntax
$self->addPatchFolderToGit($CommitBranch, $PatchFolder)
Input
$CommitBranch (string)
current branch
$PatchFolder (string)
folder of generated patch files

checkoutTargetBranch

create the given $TargetBranch from the current branch

Syntax
$self->checkoutTargetBranch($TargetBranch);
Input
$TargetBranch (string)
target branch to build patch files

commitChangesToBranch

commit Cartridge.pm and patch files to CommitBranch

Syntax
$self->commitChangesToBranch($CommitBranch, $OldVersion)
Input
$CommitBranch (string)
current branch
$OldVersion (string)
previous epages release version
$CommitId (string)
The SHA-1 hash value identifying a commit

exportGitReleaseFolders

export two versions of one cartridge, one tagged with old release and one tagged with the new release tag to different folders

Syntax
$self->exportGitReleaseFolders($OldDir, $NewDir, $ReleaseOld, $ReleaseNew, $CommitBranch);
Input
$OldDir (string)
directory to export cartridge version tagged with old release tag
$NewDir (string)
directory to export cartridge version tagged with new release tag
$ReleaseOld (string)
the epages release code for the old version, e.g. release_6_17_36
$ReleaseNew (string)
the epages release code for the new version, e.g. release_6_17_36_1
$CommitBranch (string)
the branch on which the patch code is to be commited.

new

Creates a new GitPatchBuilder object, responsible for building patch files for each cartridge and commit changes

Syntax
$GitPatchBuilder = DE_EPAGES::Installer::API::GitPatchBuilder->new(
    'verbose' => 0,
);
Input
$hOptions (hash)
keys
  • verbose - if 1 all messages where printed

Return
$GitPatchBuilder (object)
GitPatchBuilder object

printMessage

print message if verbose is true

Syntax
$self->printMessage('message to test');
Input
$Message (string)
message to print