Created
April 26, 2010 19:11
-
-
Save subtleGradient/379750 to your computer and use it in GitHub Desktop.
git-transmit opens your recently modified files using Panic's Transmit.app DockSend
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
#!/usr/bin/env bash | |
# author: Thomas Aylott SubtleGradient.com | |
echo "Transmitting" | |
for i in `git log -${1:-1} $2 --name-only|grep -E '^[^ ]+$'|sort|uniq`; do | |
if [[ -e $i ]]; then | |
echo " $i" | |
open -a Transmit $i | |
fi | |
done |
Author
subtleGradient
commented
Mar 3, 2012
via email
Hmm…
I can't tell why it would put them at the root from the script you wrote.
Do those droplets work normally when you just drop files on them with the mouse?
— Thomas Aylott - SubtleGradient - MooTools - Facebook (from iPhone)
…On Mar 3, 2012, at 7:46 AM, ***@***.*** wrote:
Nice one!
Got the if statement working fine. However, it just seems to ignore the local file directory and puts them all to the root?
echo "Transmitting..."
for i in `git log -${2:-1} $3 --name-only|grep -E '^[^ ]+$'|sort|uniq`; do
if [[ -e $i ]]; then
echo " $i"
if [ $1 == 'live' ]
then
open -a ftp-live.app $i
fi
if [ $1 == 'staging' ]
then
open -a ftp-staging.app $i
fi
fi
done
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/379750
You're right, the droplet ignores any structure and just uploads it to the root with a mouse drag and drop.
That's a shame, I don't know if we'd be able to force it to respect the structure or tell it "where it has to go" with another argument.
@subtleGradient Thanks for this, it's great!
@subtleGradient thanks for this, its great! I am also trying to configure this to deploy to specific ftp server/transmit favourites. It would be cool if I could get to check for a environment argument e.g $ git-transmit dev
@dancourse did you manage to get this to work with specific Transmit favourite? At the moment the script will deploy to all favourites.
Hey guys, checkout the fork I just uploaded. It's aims to be smart about only pushing files that have changed by using a local tag to track where the repo was at each time you do a push. https://gist.github.com/quickshiftin/8809435
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment