Move git-upload-pack command to git plugin
Also use the same APP escaping as used for other git commands.
This commit is contained in:
1 parent
5f6f73ff22
commit
aa1c7f6fa4
2 files changed
+7
-7
No files matched your search
@@ -38,13 +38,6 @@ case "$1" in
|
|||||||
echo
|
echo
|
||||||
;;
|
;;
|
||||||
|
|
||||||
git-upload-pack)
|
|
||||||
APP=${2//"'"/} # strip single quotes from the app name: 'app_name' -> app_name
|
|
||||||
pluginhook pre-pull $APP
|
|
||||||
cat | git-upload-pack "$DOKKU_ROOT/$APP"
|
|
||||||
pluginhook post-pull $APP
|
|
||||||
;;
|
|
||||||
|
|
||||||
build)
|
build)
|
||||||
APP="$2"; IMAGE="dokku/$APP"; CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
APP="$2"; IMAGE="dokku/$APP"; CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||||
id=$(cat | docker run -i -a stdin $DOKKU_DISTRO /bin/bash -c "mkdir -p /app && tar -xC /app")
|
id=$(cat | docker run -i -a stdin $DOKKU_DISTRO /bin/bash -c "mkdir -p /app && tar -xC /app")
|
||||||
|
|||||||
@@ -34,6 +34,13 @@ case "$1" in
|
|||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
git-upload-pack)
|
||||||
|
APP="$(echo $2 | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g')"
|
||||||
|
pluginhook pre-pull $APP
|
||||||
|
cat | git-upload-pack "$DOKKU_ROOT/$APP"
|
||||||
|
pluginhook post-pull $APP
|
||||||
|
;;
|
||||||
|
|
||||||
git-*)
|
git-*)
|
||||||
APP="$(echo $2 | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g')"
|
APP="$(echo $2 | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g')"
|
||||||
APP_PATH=$DOKKU_ROOT/$APP
|
APP_PATH=$DOKKU_ROOT/$APP
|
||||||
|
|||||||
Reference in new issue
Block a user