Last active
August 29, 2015 14:13
-
-
Save mcgaffin/936ee5da26733a42af11 to your computer and use it in GitHub Desktop.
Deploy only changed files to ftp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# submitted by a user via intercom: https://app.intercom.io/a/apps/hb7wi6ch/inbox/unassigned/conversations/681962001 | |
mkdir ~/clone/git_clone | |
mkdir ~/clone/changes_only | |
cd ~/clone/git_clone | |
git clone https://username:password@repo | |
cd ~/clone/git_clone/repo | |
tar cf - $(git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $COMMIT_ID) | ( cd ~/clone/changes_only; tar xpf -) | |
lftp -c "open -u $FTP_USER,$FTP_PASSWORD 31.186.174.218; set ssl:verify-certificate no; mirror -R ~/clone/changes_only/ /remote_dir" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment