fix: do not trigger git builds when calling tar:from

Closes #3047
This commit is contained in:
Jose Diaz-Gonzalez
2018-03-03 18:30:17 -05:00
parent c9d9750afe
commit 2b0d34d0db
4 changed files with 32 additions and 36 deletions

View File

@@ -57,7 +57,7 @@ tar_in_cmd() {
verify_app_name "$2"
tee "$DOKKU_ROOT/$APP/src.tar" | wc -c
plugn trigger receive-app "$APP"
tar_receive_app "$APP"
}
tar_from_cmd() {
@@ -69,3 +69,18 @@ tar_from_cmd() {
shift 3
curl -# --insecure -L "$URL" | tar_in_cmd "tar:in" "$APP" "$@"
}
tar_receive_app() {
declare desc="tar receive-app plugin trigger"
declare APP="$1"
# Don't trigger tar build if there is no tarball.
if [[ ! -f "$DOKKU_ROOT/$APP/src.tar" ]]; then
true
else
acquire_app_deploy_lock "$APP"
# shellcheck disable=SC2086
tar_build "$@"
release_app_deploy_lock "$APP"
fi
}