This is the multi-page printable view of this section. Click here to print.
Bzl
Bazel rules
- 1: al_git_binary
- 2: al_git_changelog
- 3: al_git_current_state
- 4: al_git_extension
- 5: al_git_info_file
- 6: al_git_repo
- 7: al_git_resolved_toolchain
- 8: al_git_run_binary
- 9: al_git_toolchain
1 - al_git_binary
al_git_binary
load("@com_alwaldend_src//tools/git/main/bzl:al_git_binary.bzl", "al_git_binary")
al_git_binary(name, arguments)
Run git binary
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| arguments | Git arguments (templated) | List of strings | optional | [] |
2 - al_git_changelog
al_git_changelog
load("@com_alwaldend_src//tools/git/main/bzl:al_git_changelog.bzl", "al_git_changelog")
al_git_changelog(name, visibility, git_binary, subpackages)
Create changelog target
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| name | target name prefix | none |
| visibility | visibility | none |
| git_binary | - |
"@git//:git" |
| subpackages | subpackages | [] |
3 - al_git_current_state
4 - al_git_extension
al_git_extension
al_git_extension = use_extension("@com_alwaldend_src//tools/git/main/bzl:al_git_extension.bzl", "al_git_extension")
al_git_extension.local_git(name)
Create git repos
TAG CLASSES
local_git
Attributes
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | Name | Name | required |
5 - al_git_info_file
al_git_info_file
load("@com_alwaldend_src//tools/git/main/bzl:al_git_info_file.bzl", "al_git_info_file")
al_git_info_file(name, git_state, git_tool, timeout)
Generate git info file
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| git_state | Files that should invalidate the cache on new commit | List of labels | optional | [] |
| git_tool | Git tool to use | Label | optional | "@com_alwaldend_src//tools/git/main/go" |
| timeout | Timeout in seconds | Integer | optional | 60 |
6 - al_git_repo
al_git_repo
load("@com_alwaldend_src//tools/git/main/bzl:al_git_repo.bzl", "al_git_repo")
al_git_repo(name, repo_mapping)
Git repo
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this repository. | Name | required | |
| repo_mapping | In WORKSPACE context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.For example, an entry "@foo": "@bar" declares that, for any time this repository depends on @foo (such as a dependency on @foo//some:target, it should actually resolve that dependency within globally-declared @bar (@bar//some:target).This attribute is not supported in MODULE.bazel context (when invoking a repository rule inside a module extension’s implementation function). |
Dictionary: String -> String | optional |
7 - al_git_resolved_toolchain
al_git_resolved_toolchain
load("@com_alwaldend_src//tools/git/main/bzl:al_git_resolved_toolchain.bzl", "al_git_resolved_toolchain")
al_git_resolved_toolchain(name)
Resolved git toolchain
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required |
8 - al_git_run_binary
al_git_run_binary
load("@com_alwaldend_src//tools/git/main/bzl:al_git_run_binary.bzl", "al_git_run_binary")
al_git_run_binary(name, srcs, outs, arguments, git)
Run a git binary as a build action
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| srcs | Files to be made available | List of labels | optional | [] |
| outs | Outputs | List of labels; nonconfigurable | required | |
| arguments | Arguments (Location is expanded) | List of strings | optional | [] |
| git | Git binary | Label | required |
9 - al_git_toolchain
al_git_toolchain
load("@com_alwaldend_src//tools/git/main/bzl:al_git_toolchain.bzl", "al_git_toolchain")
al_git_toolchain(name, git_dir, git_path, git_root, invalidation)
Local git toolchain
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| git_dir | Git directory path | String | required | |
| git_path | Git binary path | String | required | |
| git_root | Git workspace path | String | required | |
| invalidation | Files that should invalidate git actions | List of labels | optional | [] |