-
Notifications
You must be signed in to change notification settings - Fork 9
/
commands
executable file
·51 lines (44 loc) · 1.18 KB
/
commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/clone/functions"
case "$1" in
help | clone:help)
help_content_func() {
declare desc="return help_content string"
cat<<help_content
clone <git url> <optional branch / tag>, creates/updates app from remote git repo
clone:key, outputs the dokku public deploy key
clone:allow, adds a domain to known_hosts
help_content
}
if [[ $1 = "clone:help" ]] ; then
echo -e 'Usage: dokku clone <app> <git-url> [git-branch/tag]'
echo ''
echo 'Clones and builds remote repos into dokku app'
echo ''
echo 'Example:'
echo ''
echo '$ dokku clone nodeapp https://github.com/heroku/node-js-sample'
echo ''
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
help_content_func
else
cat<<help_desc
clone, Plugin for creating applications from a git url
help_desc
fi
;;
clone)
clone_main_cmd "$@"
;;
clone:key)
clone_key_cmd "$@"
;;
clone:allow)
clone_allow_cmd "$@"
;;
*)
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
;;
esac