git - Fabric -f option not working -


i've been using fabric local machine while , have decent deploy script i'd call during post-receive hook git. in order accomplish have following code, of verified until fab command:

deploy=... # code determine if should deploy  if [[ $deploy ]] ;   tmpfile="/tmp/$(basename $0).$$.tmp"   git cat-file blob release:fabfile.py > $tmpfile   fab -f $tmpfile deploy:servername.mycompany.com   rm $tmpfile fi 

i've checked each step of way, , i'm positive tmpfile being created correctly (it contains fabfile). manually running steps above w/ made file in /tmp/ results in same behavior.

the worst part "reminds" me can use -f specify fabfile...which am.

this because wants file .py @ end. change temp file use file extension , work. it's artifact of fab's wanting allow people use python style directory classes fabfile/__init__.py picked -f fabfile

example of behavior here:

╭─mgoose@macintosh  ~ ╰─$ fab -f tmp.py test [localhost] local: whoami mgoose  done. ╭─mgoose@macintosh  ~ ╰─$ mv tmp.py tmp.py.tmp ╭─mgoose@macintosh  ~ ╰─$ fab -f tmp.py.tmp test  fatal error: couldn't find fabfiles!  remember -f can used specify fabfile path, , use -h help.  aborting. ╭─mgoose@macintosh  ~ ╰─$ cat tmp.py.tmp                                                                                                                                                                                                                        1 ↵ fabric.api import local, task  @task def test():     local("whoami") 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -