-
-
Save zz-chen/dffdd324e582bce568e149ea2e3a50ce to your computer and use it in GitHub Desktop.
Custom file deployment actions for SourceTree. The zip archives generated retain directory structure so you can FTP them to a remote server in one shot. Actions are set up under Preferences -> Custom Actions and all have the Parameters set to "$REPO, $SHA"
This file contains hidden or 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
#!/bin/sh | |
# creates a zip archive of the files modified in a merge. | |
args=("$@") | |
git archive -o deploy/deploy-${args[1]:0:7}.zip HEAD $(git diff-tree --no-commit-id --name-only -r ${args[1]}) |
This file contains hidden or 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
#!/bin/sh | |
# creates a zip archive of the files modified in a commit | |
args=("$@") | |
git archive -o deploy/deploy-${args[1]:0:7}-${args[2]:0:7}.zip HEAD $(git diff-tree --name-only -r ${args[1]} ${args[2]}) |
This file contains hidden or 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
#!/bin/sh | |
# creates a zip archive of the files modified between two commits | |
args=("$@") | |
git archive -o deploy/deploy-merge-${args[1]:0:7}.zip HEAD $(git log -m -1 --name-only --pretty="format:" ${args[1]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment