예제 #1
0
def uvcdat_vistrails_branch():
    git_dir = os.path.join(vistrails_root_directory(), '..')
    with Chdir(git_dir):
        release = "update_before_release"
        if vistrails.core.requirements.executable_file_exists('git'):
            lines = []
            result = execute_cmdline(['git', 'rev-parse', '--abbrev-ref', 'HEAD' ],
                                     lines)
            if len(lines) == 1:
                if result == 0:
                    release = lines[0].strip()
    return release
예제 #2
0
def uvcdat_revision():
    """uvcdat_revision() -> str 
    When run on a working copy, shows the current git hash else
    shows the latest release revision

    """
    git_dir = os.path.join(vistrails_root_directory(), '..')
    with Chdir(git_dir):
        release = "update_before_release"
        if vistrails.core.requirements.executable_file_exists('git'):
            lines = []
            result = execute_cmdline(['git', 'describe', '--tags', ],
                                     lines)
            if len(lines) == 1:
                if result == 0:
                    release = lines[0].strip()
    return release