From 78591a618b4bffcdfb9089ddeca20218b8110f10 Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Fri, 29 Nov 2013 14:12:10 +0000 Subject: [PATCH 1/2] Remove plugins before copying them again. This way plugins can rename/delete files w/o having old files lying around. --- Makefile | 1 + plugins/nginx-vhosts/commands | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100755 plugins/nginx-vhosts/commands diff --git a/Makefile b/Makefile index a30252443..4aac37a20 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ install: dependencies stack copyfiles plugins version copyfiles: cp dokku /usr/local/bin/dokku + rm -Rf /var/lib/dokku/plugins mkdir -p /var/lib/dokku/plugins cp -r plugins/* /var/lib/dokku/plugins diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands deleted file mode 100755 index bb5defd1e..000000000 --- a/plugins/nginx-vhosts/commands +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x - -case "$1" in - help) - cat - ;; -esac - From 4da4995a18f9088ab2bbfc34d04e35bcc0afbb0b Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Fri, 29 Nov 2013 20:31:22 +0000 Subject: [PATCH 2/2] Only delete core plugins. --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4aac37a20..70506e6da 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,13 @@ install: dependencies stack copyfiles plugins version copyfiles: cp dokku /usr/local/bin/dokku - rm -Rf /var/lib/dokku/plugins mkdir -p /var/lib/dokku/plugins - cp -r plugins/* /var/lib/dokku/plugins + find /var/lib/dokku/plugins -mindepth 2 -maxdepth 2 -name '.core' -printf '%h\0' | xargs -0 rm -Rf + find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do \ + rm -Rf /var/lib/dokku/plugins/$$plugin && \ + cp -R plugins/$$plugin /var/lib/dokku/plugins && \ + touch /var/lib/dokku/plugins/$$plugin/.core; \ + done version: git describe --tags > ${DOKKU_ROOT}/VERSION 2> /dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ${DOKKU_ROOT}/VERSION