这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/git/commands
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ case "$1" in
# 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 receive-app $APP $newrev
pluginhook -p receive-app $APP $newrev
else
if test -f "$PLUGIN_PATH"/enabled/*/receive-branch; then
pluginhook receive-branch $APP $newrev $refname
Expand Down
7 changes: 6 additions & 1 deletion plugins/git/receive-app
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ source "$(dirname $0)/../common/functions"

APP="$1"; REV="$2"

dokku git-build $APP $REV
# Don't trigger git build if there is no git repository.
if [ ! -d "$DOKKU_ROOT/$APP/refs" ]; then
cat
else
dokku git-build $APP $REV
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add context here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you run ps:rebuild, but the application is not backed by git, you get an ugly error message to that effect from git. Also its my understanding that if your plugin doesn't wish to act, that it should exec cat so that the messages on std out by other processes get passed though.

Basically we only want to call git-build if we are building a git based app.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

2 changes: 1 addition & 1 deletion plugins/ps/commands
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ case "$1" in
verify_app_name "$2"
APP="$2"

pluginhook receive-app $APP
pluginhook -p receive-app $APP
;;

ps:rebuildall)
Expand Down