$ wf g -w /path/to/warp10 io.warp10 warp10-ext-git
/path/to/warp10/is where Warp 10 is physically located.
Git WarpScript Extension
warp10-ext-git extension adds functions to interact with Git repositories.
The repositories the functions can interact with must reside in a directory configured in your Warp 10 configuration under key
git.root. This directory can contain symbolic links pointing to the actual repositories.
The functions provided by this extension do not aim at implementing all the features of Git, instead they are meant to simply allow a Warp 10 instance to store, load and list files maintained in a Git repository.
The functions rely on the capability mechanism introduced in Warp 10 2.7.2, so make sure you run a compatible version of Warp 10 before installing this extension.
The extension must first be declared in the configuration:
warpscript.extension.git = io.warp10.ext.git.GitWarpScriptExtension
Then the root directory where the extension expects to find the repository must be configured:
git.root = /path/to/git/root
Restart your Warp 10 instance, the extension will be loaded and its functions available.
Access rights are governed by token capabilities. The following capabilities are defined:
|The name of the repository the token grants access to. This is the name of the link or directory present in the directory pointed to by |
|The name which will appear in commit messages for operations which modify a repository. If unset, |
|The email address appearing in commit messages. If unset |
|Subdirectory of |
|If this attribute is present, whatever the associated value, access to the repository is read only.|
In order to use the functions from this extension, you must first add the capabilities from a token to your execution environment via the
GIT* functions can be used and interact with the repository for which capabilities are available.
The extension adds the following functions to the WarpScript language. The detailed documentation for each is available in dedicated pages.
Store some content in a file in a repository.
Remove files from a repository.
Retrieve data from a file in a repository.
Find files matching a regular expression in a repository.
Adds a tag to a repository.