def reduce_to_release(): b = get_behavior() v = c.getenv_or_none('VERSION') if b == 'L': return get_latest_release() if b == 'S': return c.print_and_call(c.write_log('Assuming release', 'w'), lambda: v.split('-SNAPSHOT')[0]) return v
def do_reduce(): b = get_behavior() v = c.getenv_or_none('VERSION') if b == 'L': return get_latest_available_snapshot() if b == 'S': return v if b == 'E': return exact_to_snapshot(v)
def get_obligatory_params(): return dict(map(lambda x: (x[0], c.gid_to_uri(x[1])) if x[0] == 'GID' else (x[0], x[1]), zip(get_obligatory_params_names(), map(lambda x: c.getenv_or_none(x), get_obligatory_params_names()))))