Пример #1
0
def main():
    cli_parser = get_cli_parser()
    (options, commands) = cli_parser.parse_args()

    global host_spec
    host_spec = options.upload_host

    repo = get_repository(options)

    version_dict = misc.grok_sh_variables_str(repo.read_file('VERSION'))
    version_tup = tuple(
        map(version_dict.get,
            ('MAJOR_VERSION', 'MINOR_VERSION', 'PATCH_LEVEL')))
    version_tup = tuple(map(int, version_tup))

    version_db = versiondb.VersionDataBase(options.version_db)
    cmds = upload_binaries(repo, version_tup, version_db)

    if options.execute:
        cmds = [c for c in cmds if 'test-binary' not in c]
        for cmd in cmds:
            print(cmd)
            system(cmd)
    else:
        printf('\n\n')
        printf('\n'.join(cmds))
        printf('\n\n')
Пример #2
0
def main ():
    cli_parser = get_cli_parser ()
    (options, commands)  = cli_parser.parse_args ()

    global host_spec
    host_spec = options.upload_host

    repo = get_repository (options)

    version_dict = misc.grok_sh_variables_str (repo.read_file ('VERSION'))
    version_tup = tuple (map (version_dict.get, ('MAJOR_VERSION', 'MINOR_VERSION', 'PATCH_LEVEL')))
    version_tup = tuple (map (int, version_tup))
    
    version_db = versiondb.VersionDataBase (options.version_db)
    cmds = upload_binaries (repo, version_tup, version_db)

    if options.execute:
        cmds = [c for c in cmds if 'test-binary' not in c]
        for cmd in cmds:
            print (cmd)
            system (cmd)
    else:
        printf ('\n\n')
        printf ('\n'.join (cmds))
        printf ('\n\n')
Пример #3
0
 def version_from_VERSION(self):
     try:
         s = self.read_file('base/version.mak')
         if not 'GS_VERSION_MAJOR' in s:
             urg
         d = misc.grok_sh_variables_str(s)
         return '%(GS_VERSION_MAJOR)s.%(GS_VERSION_MINOR)s' % d
     except:
         pass
     return '0.0'
Пример #4
0
 def version_from_VERSION (self):
     try:
         s = self.read_file ('base/version.mak')
         if not 'GS_VERSION_MAJOR' in s:
             urg
         d = misc.grok_sh_variables_str (s)
         return '%(GS_VERSION_MAJOR)s.%(GS_VERSION_MINOR)s' % d
     except:
         pass
     return '0.0'
Пример #5
0
 def version_from_VERSION(self):
     try:
         s = self.read_file("base/version.mak")
         if not "GS_VERSION_MAJOR" in s:
             urg
         d = misc.grok_sh_variables_str(s)
         return "%(GS_VERSION_MAJOR)s.%(GS_VERSION_MINOR)s" % d
     except:
         pass
     return "0.0"