fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] fab "let" command


From: Jeff Forcier
Subject: Re: [Fab-user] fab "let" command
Date: Sun, 12 Jul 2009 12:30:05 -0400

Hi Ben, apologies for the delay in replying!

There's no replacement for the old global 'let' flag right now, but
that's mostly because I haven't taken the time to re-examine it and
see how such a feature fits into the new scheme of things. Something
like that may well show up again in the future.

One option that may be used as a workaround is to specify arguments to
your tasks, e.g. "fab deploy:fixtures=my_fixture.json", which is
equivalent to calling "deploy(fixtures='my_fixture.json')". This is
subtly different from setting env vars directly, but can serve much
the same purpose. The docs for this aspect of Fabric can be found
here:

    http://docs.fabfile.org/0.9/api/main.html#fabric.main.parse_arguments

Otherwise, as you mentioned, you could write tasks to do this for you
-- even make your own "let" to set env vars, which coincidentally
would have the same syntax as the old let builtin, due to how the
above task args feature works.

Best,
Jeff

On Thu, Jul 9, 2009 at 5:44 PM, Ben Davis<address@hidden> wrote:
> One other thing I've also noticed while upgrading to 0.9,  is that the "let"
> command no longer works.  For example, one of my commands would be
>
> fab staging let:fixtures=my_fixture.json deploy
>
> My deployment script would then set the fixtures variable and I could use
> that in any of my functions.   Is there a way to do this w/ 0.9?  Or is it
> just a matter of writing my own "let" command?
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]