Open eduardonunesp opened 8 years ago
About the current host used, never mind, I found the SUP_HOST
variable, which inform the current host. Just need to add in README :neckbeard:
Unfortunately the SUP_HOST
doesn't make difference in this case, because when rsync
runs the current host is localhost
. :cry:
Is it possible to create an intermediary command, just to inject variables at the global ? something like:
trick:
export: TRICK_ENV=$SUP_HOST
rsync:
local: rsync -aczP src/ $TRICK_ENV:$TMP_DIR
targets:
deploy:
- trick
- rsync
I know that command export
doesn't exists, but it's just an option to set some variable at runtime. Actually if I have more then one host it need to have an option to run the local rsync
for each host as well.
It would be great to have option to use rsync
in upload, like:
commands:
upload:
desc: Upload dist files to all hosts
upload:
- src: ./dist
dst: /tmp/
uploader: rsync
I am interested in being able to pass name of the current remote computer, so I command like the following can be written against all computers and not hardcoded to one:
rsync:
local: rsync -aczP src/ $each_remote_computer_name:$HOME/blah
I could not figure out if there is already a built-in variable that reflects the name of current remote computer connection.
Hey everyone, I managed to upload my src files using
rsync
instead using the native option (tar), so I want to show mySupfile
and to share my idea, I hope that action bring new ideas and show how much Sup is a cool and flexible option.Important to note: rsync command is working in local
src
directory and thessh
address is using environment variables (created inside theSupfile
). Well, it would be cool if we had some way to get array of hosts like we have theSUP_NETWORK
for instance.