From 1599afa74f29f126fdcea2cc0e9577d5aabf0e86 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 25 Mar 2021 20:37:37 -0400 Subject: [PATCH 1/2] docs: add docs for git-from-directory trigger --- docs/development/plugin-triggers.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/development/plugin-triggers.md b/docs/development/plugin-triggers.md index bc540b7f0..d00013828 100644 --- a/docs/development/plugin-triggers.md +++ b/docs/development/plugin-triggers.md @@ -698,6 +698,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x # TODO ``` +### `git-from-directory` + +- Description: Updates an app's git repository from a source directory and then triggers a build +- Invoked by: `git:from-image` and `git:from-archive` +- Arguments: `$APP $SOURCECODE_WORK_DIR $USER_NAME $USER_EMAIL` +- Example: + +```shell +#!/usr/bin/env bash + +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x + +# TODO +``` + ### `git-post-pull` - Description: From 8083ff658434e12a07af34094426fa9a9a3f245b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 25 Mar 2021 20:38:38 -0400 Subject: [PATCH 2/2] feat: update error for git:from- commands when the artifact is already synced Closes #4520 --- plugins/git/git-from-directory | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/git/git-from-directory b/plugins/git/git-from-directory index 867b87c8c..b204c3526 100755 --- a/plugins/git/git-from-directory +++ b/plugins/git/git-from-directory @@ -42,7 +42,8 @@ trigger-git-git-from-directory() { suppress_output fn-git-cmd "$TMP_WORK_DIR" add --all suppress_output fn-git-cmd "$TMP_WORK_DIR" update-index --refresh if suppress_output fn-git-cmd "$TMP_WORK_DIR" diff-index --quiet HEAD --; then - dokku_log_warn "No changes detected, aborting git update" + dokku_log_warn "No changes detected, skipping git commit" + dokku_log_warn "Call 'ps:rebuild' on app to rebuild the app from existing source" return fi