feat: add ability to initialize a git repository out of band

This is useful in contexts where the repository directory may be created and interacted with via git-http-backend or other methods of updating a repository.
This commit is contained in:
Jose Diaz-Gonzalez
2018-04-01 23:13:11 -04:00
parent 72674e5c6c
commit 83f320ac8e
9 changed files with 120 additions and 12 deletions

View File

@@ -40,3 +40,30 @@ cmd-git-report() {
[[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed"
fi
}
git_help_content_func() {
declare desc="return git plugin help content"
cat<<help_content
git:initialize <app>, Initialize a git repository for an app
git:report [<app>] [<flag>], Displays a git report for one or more apps
git:set <app> <property> (<value>), Set or clear a git property for an app
help_content
}
cmd-git-help() {
if [[ $1 = "git:help" ]] ; then
echo -e 'Usage: dokku git[:COMMAND]'
echo ''
echo 'Manages the git integration for an app.'
echo ''
echo 'Additional commands:'
git_help_content_func | sort | column -c2 -t -s,
echo ''
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
git_help_content_func
else
cat<<help_desc
git, Manages the git integration for an app
help_desc
fi
}