I am writing a task where output of local wrapper needs to be assigned to a
variable so that it can be used later in another command. Following is a task
where commit_sha1 is obtained from git command and then used in tar command:
{{{
# Create project-commit-id.tar.gz for the project
def make_tar():
"""Create tar.gz archive with latest commit id"""
with lcd('%s/%s' %(env.builddir,env.projectrepo)):
commit_sha1 = local('git log -1 --pretty=format:%H')
with lcd('%s' %(env.builddir)):
local('tar cvzf %s-%s.tar.gz %s'
%(env.projectrepo,commit_sha1,env.projectrepo))
}}}
It seems like 'commit_sha1' variable is not getting set at all. I am using
Fabric 1.2.0.
Am I missing anything here? Any help?
--
Thanks,
Shantanu.
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user