Пример #1
0
def enqueue(args):

    argc = len(args)
    
    store = db.initdb()

    if argc < 2:
        dlog("Usage: %s enqueue <buildset name/idx>" % sys.argv[0])
        dlog("\nAvailable buildsets:\n")
        db.buildset.dumpNames(store,  sys.stdout.write)
        return False
                
    if not utils.lockPid(OPTIONS.pid_file):
        dlog("Pidfile already exists -> aborting")
        return False
    
    buildset = db.buildset.getByIdent(store, unicode(args[1]))

    if not buildset:
        print u"Error: No buildset called '%s'" % unicode(args[1])
        # Clean up for next run
        os.remove(PID_FILE)
        return

    print u'Using buildset "%s"' % buildset.name

    build = db.build.createFromBuildset(buildset)

    building.run_build(build, store)
    
    # Clean up for next run
    os.remove(OPTIONS.pid_file)
Пример #2
0
def build(args):

    argc = len(args)

    store = db.initdb()

    if argc < 2:
        dlog("Usage: %s build <buildset name/idx>" % sys.argv[0])
        dlog("\nAvailable buildsets:\n")
        db.buildset.dumpNames(store, sys.stdout.write)
        return False

    buildset = db.buildset.getByIdent(store, unicode(args[1]))

    if not buildset:
        print u"Error: No buildset called '%s'" % unicode(args[1])
        # Clean up for next run
        return

    print u'Using buildset "%s"' % buildset.name

    build = db.build.createFromBuildset(buildset)

    if not utils.lockPid(OPTIONS.pid_file):
        dlog("Already building in this dir (Pidfile exists) -> aborting")
        return False

    building.run_build(build, store)

    # Clean up for next run
    os.remove(OPTIONS.pid_file)
Пример #3
0
def re(args):
    
    argc = len(args)

    store = db.initdb()

    bs = lookup_or_create_buildset_by_regex(args[1], store)

    # now create that build
    b = db.build.createFromBuildset(bs)

    if not utils.lockPid(OPTIONS.pid_file):
        dlog("Already building in this dir (Pidfile exists) -> aborting")
        return False

    building.run_build(b, store)
    
    # Clean up for next run
    os.remove(OPTIONS.pid_file)
Пример #4
0
def re(args):

    argc = len(args)

    store = db.initdb()

    bs = lookup_or_create_buildset_by_regex(args[1], store)

    # now create that build
    b = db.build.createFromBuildset(bs)

    if not utils.lockPid(OPTIONS.pid_file):
        dlog("Already building in this dir (Pidfile exists) -> aborting")
        return False

    building.run_build(b, store)

    # Clean up for next run
    os.remove(OPTIONS.pid_file)