Skip to content

Commit

Permalink
Moved trailing slash to rsync source directory from .travis.yml to de…
Browse files Browse the repository at this point in the history
…ploy.sh
  • Loading branch information
davidbyoung committed Aug 25, 2019
1 parent 2c46c84 commit eb2f398
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
Expand Down

0 comments on commit eb2f398

Please sign in to comment.