\apex\app\pkggithub

Handles all integration between Github and Apex packages, allowing for the full collaboration functionality within Github to be utilized while developing Apex packages. For full details, please view the documentation at: https://apex-platform.org/docs/github

Summary

Methods
Properties
Constants
init()
sync()
sync_from_dir()
compare()
compile_components()
No public properties found
No constants found
compile()
No protected properties found
N/A
download_archive()
$default_readme
$dest_dirs
N/A

Properties

$default_readme

$default_readme :

Type

$dest_dirs

$dest_dirs :

Type

Methods

init()

init(string  $pkg_alias)

Initialize a local Github repo.

Parameters

string $pkg_alias

The package alias to initialize.

sync()

sync(string  $pkg_alias)

Sync from Github repo to local filesystem.

Requires the GIthub repo to already be downloaded to the local filesystem, and will go through all files, and update local filesystem with any modified files from the GIthub repo.

Parameters

string $pkg_alias

The package alias being synced.

sync_from_dir()

sync_from_dir(string  $pkg_alias,string  $tmp_dir)

Sync from temp directory

Parameters

string $pkg_alias

The package alias to snyc.

string $tmp_dir

The temp directory which holds the unpacked git archive.

compare()

compare(string  $pkg_alias,string  $upgrade_version = '')

Compare git repo with local filesystem

This assumes the local filesystem is more updated than the git repository. It will download the git repo, compare all files against the local filesystem, and create the /src/PKG_ALIAS/git/git.sh file to add all updated files to the next git commit / push.

Use this when you want to ensure the git repository has the exact same code base as the local filesystem.

Parameters

string $pkg_alias

The package alias to compare.

string $upgrade_version

Optional version if we're publishing an upgrade.

compile_components()

compile_components(string  $pkg_alias,string  $tmp_dir = ''): array

Compile components

Parameters

string $pkg_alias

The alias of the package.

string $tmp_dir

Optional temp directory to compile from, otherwise will use standard /src/PACKAGE/git/ directory.

Returns

array —

The compiled components, same as toc.json format.

compile()

compile(string  $pkg_alias)

Compile a local Github repo

Parameters

string $pkg_alias

The alias of the package to compile'

download_archive()

download_archive(string  $pkg_alias,boolean  $allow_empty = false): string

Download archive from git repository.

Parameters

string $pkg_alias

The package alias to download repo of.

boolean $allow_empty

Whether or not to allow an empty / non-existent archive

Returns

string —

The tmporary directory where archive is unpacked, or false if unsuccessful.