feat: add git-get-property trigger

This commit is contained in:
Jose Diaz-Gonzalez
2022-12-18 17:49:47 -05:00
parent d202050d30
commit 1e58b56ac7
3 changed files with 36 additions and 0 deletions

19
plugins/git/git-get-property Executable file
View File

@@ -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 "$@"