Esempio n. 1
0
def run(appID, buildID):
    if not appID or not buildID:
        print "Please supply application indetifier and build identifier."
        return
    else:
        # Build a prod version of Tasks
        commands.append(cmd.relative(""))
        commands.append(["sc-build", "-rc", "--build=%s" % buildID])

        # Copy prod build to Tasks GAE backend (cloned eariler)
        commands.append(cmd.relative("tasks_gae"))
        commands.append(["cp", "-r", "../tmp/build/static", "."])

        # Run the commands
        cmd.run(commands)

        # Configure app.yaml in tasks_gae
        file_to_configure = cmd.relative("tasks_gae/app.yaml")
        app_regex = r'^application\:\s+(\w+-\w+)'
        build_regex = r'^\s+\w+\:\s+static\/tasks\/en\/(.*)\/index\.html'

        filetools.replaceStringsInFile(file_to_configure, app_regex,
                                       "%s" % appID)
        filetools.replaceStringsInFile(file_to_configure, build_regex,
                                       "%s" % buildID)
Esempio n. 2
0
def run(appID, buildID):
  if not appID or not buildID:
    print "Please supply application indetifier and build identifier."
    return
  else:
    # Build a prod version of Tasks
    commands.append(cmd.relative(""))
    commands.append(["sc-build", "-rc", "--build=%s" % buildID])
    
    # Copy prod build to Tasks GAE backend (cloned eariler)
    commands.append(cmd.relative("tasks_gae"))
    commands.append(["cp", "-r", "../tmp/build/static", "."])
    
    # Run the commands
    cmd.run(commands)
    
    # Configure app.yaml in tasks_gae
    file_to_configure = cmd.relative("tasks_gae/app.yaml")
    app_regex = r'^application\:\s+(\w+-\w+)'
    build_regex = r'^\s+\w+\:\s+static\/tasks\/en\/(.*)\/index\.html'
    
    filetools.replaceStringsInFile(file_to_configure, app_regex, "%s" % appID)
    filetools.replaceStringsInFile(file_to_configure, build_regex, "%s" % buildID)
Esempio n. 3
0
def run():
	cmd.run(commands)
Esempio n. 4
0
def run():
	cmd.run(commands)