From eb2f39824da70184e6b722abbb07b157e91f4377 Mon Sep 17 00:00:00 2001 From: davidbyoung Date: Sat, 24 Aug 2019 23:45:43 -0500 Subject: [PATCH] Moved trailing slash to rsync source directory from .travis.yml to deploy.sh --- .travis.yml | 2 +- bin/deploy.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 27c3851..36c7320 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ script: vendor/bin/phpunit --verbose # Purposely leaving trailing slash on the source directory so that the contents get copied deploy: - provider: script - script: bash bin/deploy.sh $TRAVIS_BUILD_DIR/ $TRAVIS_BUILD_NUMBER $SSH_USER $SSH_HOST + script: bash bin/deploy.sh $TRAVIS_BUILD_DIR $TRAVIS_BUILD_NUMBER $SSH_USER $SSH_HOST on: branch: "1.0" skip_cleanup: true diff --git a/bin/deploy.sh b/bin/deploy.sh index e3492bd..c107679 100644 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -32,7 +32,8 @@ fi html_dir=/var/www/html target_dir=$html_dir/releases/$BUILD_NUMBER echo "rsync'ing to host" -rsync -aq --delete-after --rsync-path="mkdir -p $target_dir/ && rsync" "$SOURCE_DIR" $SSH_USER@$SSH_HOST:$target_dir/ +# Purposely leaving trailing slash on the source directory so that the contents get copied +rsync -aq --delete-after --rsync-path="mkdir -p $target_dir/ && rsync" "$SOURCE_DIR/" $SSH_USER@$SSH_HOST:$target_dir/ echo "Creating symlinks and swapping" ssh $SSH_USER@$SSH_HOST /bin/bash <