Methods
addPathsToEnvs(envPaths)
Add given environment variable paths to current process.env
Parameters:
Name | Type | Description |
---|---|---|
envPaths |
object | Environment names mapped to a list of paths to add. |
(async) getDirentPath(dirPath, func) → {string|null}
Get full path to a
fs.Direntdirectly under the given folder.
Parameters:
Name | Type | Description |
---|---|---|
dirPath |
string | Path to folder to look into. |
func |
function | Callback that returns a boolean on when the
right fs.Direntis found. |
Returns:
Path to dirent that satisfies func, else null.
- Type
- string | null
(async) getRepoRootFile(fileName, extractedPath)
Get the file path to a file in the extracted repository root folder.
Parameters:
Name | Type | Description |
---|---|---|
fileName |
string | Filename to get from extracted repository root. |
extractedPath |
string | Path to extracted tar/zip repository folder. |
Throws:
-
If filename not found directly under the repository root directory.
- Type
- MissingFileError
(async) installRez(rezGitRepo, gitRef) → {envPaths}
Installs rez.
Fetches from GitHub tools cache if previously installed, else extract
and install from the given GitHub repository link and Git ref.
Parameters:
Name | Type | Description |
---|---|---|
rezGitRepo |
string | "user or org"/"repository name" |
gitRef |
string | master or commit hash or tag name or branch name. |
Returns:
Environment variable names and paths to add for
them to setup the installed/cached rez install.
- Type
- envPaths
(async) makePackagesPaths()
Create rez packages paths.
These typically are:
- $HOME/packages
- $HOME/.rez/packages/int
- $HOME/.rez/packages/ext
(async) run()
Installs or fetch cached rez install. Setup packages path and binds if any.
Type Definitions
envPaths
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
ENV_VAR_NAMES... |
Array.<string> | Array of paths to add per environment variable. |