feat: add git-get-property trigger
This commit is contained in:
1 parent
d202050d30
commit
1e58b56ac7
3 files changed
+36
No files matched your search
@@ -803,6 +803,22 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
# TODO
|
# TODO
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `git-get-property`
|
||||||
|
|
||||||
|
- Description: Return the value for an app's git property
|
||||||
|
- Invoked by:
|
||||||
|
- Arguments: `$APP $KEY`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
APP="$1"; PROPERTY="$2"
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
### `git-from-archive`
|
### `git-from-archive`
|
||||||
|
|
||||||
- Description: Updates an app's git repository from an archive and then triggers a build
|
- Description: Updates an app's git repository from an archive and then triggers a build
|
||||||
|
|||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
hook
|
||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
|
||||||
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
trigger-git-git-get-property() {
|
||||||
|
declare desc="return the value for an app's git property"
|
||||||
|
declare trigger="git-get-property"
|
||||||
|
declare APP="$1" KEY="$2"
|
||||||
|
|
||||||
|
if [[ "$KEY" == "source-image" ]]; then
|
||||||
|
fn-git-source-image "$APP"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
trigger-git-git-get-property "$@"
|
||||||
Reference in new issue
Block a user