Hacker News new | past | comments | ask | show | jobs | submit login

Lol, I just noticed you also posted something on fabric. If I seen it I would not have submitted another entry.

One quick note. I think it's a good idea to explain that, since from the command line you are basically calling functions inside the fabfile.py, this allows you to define different environments. Something like:

def env1(): env.some_property = 'hehe'

def env2(): env.some_property = 'haha'

def deploy(): put('/%s/file.prop', '/somewhere_in_the_server/')

If you then run 'fab env1 deploy' you will copy the file under 'hehe' to the server. If you use env2 you will copy the other one. You are basically overriding the env variable. You can do the same to configure different paths for different target servers.

Really cool stuff :D




Is there a way that code could be formatted? :)


Precede the code with a blank line and then two spaces.

  $str = 'Like this.';
  echo $str;
http://news.ycombinator.com/formatdoc




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: