initial pass at switching to plugn

This commit is contained in:
Michael Hobbs
2015-06-12 18:07:08 -07:00
committed by Jose Diaz-Gonzalez
parent ac75c726ad
commit 7a545759f2
33 changed files with 163 additions and 91 deletions

View File

@@ -36,11 +36,11 @@ case "$1" in
# Only run this script for the master branch. You can remove this
# if block if you wish to run it for others as well.
if [[ $refname = "refs/heads/master" ]] ; then
# broken out into pluginhook so we might support other methods to receive an app
pluginhook -p receive-app $APP $newrev
# broken out into plugin so we might support other methods to receive an app
plugn trigger receive-app $APP $newrev
else
if test -f "$PLUGIN_PATH"/enabled/*/receive-branch; then
pluginhook receive-branch $APP $newrev $refname
plugn trigger receive-branch $APP $newrev $refname
else
echo $'\e[1G\e[K'"-----> WARNING: deploy did not complete, you must push to master."
echo $'\e[1G\e[K'"-----> for example, try 'git push <dokku> ${refname/refs\/heads\/}:master'"
@@ -51,9 +51,9 @@ case "$1" in
git-upload-pack)
APP="$(echo $2 | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g')"
pluginhook git-pre-pull $APP
plugn trigger git-pre-pull $APP
cat | git-upload-pack "$DOKKU_ROOT/$APP"
pluginhook git-post-pull $APP
plugn trigger git-post-pull $APP
;;
git-build)
@@ -100,7 +100,7 @@ EOF
;;
help | git:help)
cat
echo -n ""
;;
*)

4
plugins/git/plugin.toml Normal file
View File

@@ -0,0 +1,4 @@
[plugin]
description = "dokku core git plugin"
version = "0.4.0"
[plugin.config]