def write_version(path, ref=None):
    """Update version file using git desribe"""
    with lcd(dirname(path)):
        version = make_version(ref)
    if (env.get('full') or not os.path.exists(path)
            or version != open(path).read().strip()):
        with open(path, 'w') as out:
            out.write(version + '\n')
    return version
def write_version ( path , ref = None ) : with lcd ( dirname ( path ) ) : version = make_version ( ref ) if ( env . get ( 'full' ) or not os . path . exists ( path ) or version != open ( path ) . read ( ) . strip ( ) ) : with open ( path , 'w' ) as out : out . write ( version + '\n' ) return version
Update version file using git desribe