Add pre-receive-app plugin trigger

Users can modify the temporary working directory to add or remove any necessary files before an application is processed for deployment.
This commit is contained in:
Jose Diaz-Gonzalez
2015-10-24 00:11:29 -04:00
parent c885d23fe4
commit 7d31c4fc1e
3 changed files with 5 additions and 0 deletions

View File

@@ -21,8 +21,10 @@ git_build_app_repo() {
find -name .git -prune -exec rm -rf {} \; > /dev/null
if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]]; then
plugn trigger pre-receive-app "$APP" "dockerfile" "$TMP_WORK_DIR"
dokku receive "$APP" "dockerfile" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
else
plugn trigger pre-receive-app "$APP" "herokuish" "$TMP_WORK_DIR"
dokku receive "$APP" "herokuish" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
fi
}