From 582f42ddff47209c2340ee63947e781f9d98f0f2 Mon Sep 17 00:00:00 2001 From: Goutte Date: Mon, 26 Mar 2018 07:26:56 +0200 Subject: [PATCH] Add more sugar to the publication script. --- bin/publish | 13 +++++++++++++ 1 file changed, 13 insertions(+), 0 deletions(-) diff --git a/bin/publish b/bin/publish index 760119f..51ecead 100755 --- a/bin/publish +++ b/bin/publish @@ -88,6 +88,13 @@ echo $VERSION > VERSION # UPLOAD ###################################################################### +ssh -t -t ${USER}@${SERVER} <<-ENDSSH + cd ${REMOTE_DIR} + sudo chown -R ${USER}:apache . + exit +ENDSSH + + # Delete is dangerous, as we're using a file-based database # so we must exclude some directories and files. echo -e "${Green}Uploading files...${Off}" @@ -105,6 +112,12 @@ rsync -r --delete \ . ${USER}@${SERVER}:${REMOTE_DIR} +ssh -t -t ${USER}@${SERVER} <<-ENDSSH + cd ${REMOTE_DIR} + sudo chown -R mbouchemit:apache . + exit +ENDSSH + # REMOTE CLEANUP ############################################################## # Run some scripts on the server, now -- libgit2 0.21.2