예제 #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)
예제 #2
0
파일: setup.py 프로젝트: BRupholdt/Tasks
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)
예제 #3
0
from helpers import cmd, filetools
import os.path

cmd.setBase(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

commands = [
    cmd.relative(""),
    # Ensure that all frameworks are present for the build later
    [
        "git", "submodule", "add",
        "git://github.com/etgryphon/sproutcore-ui.git", "frameworks/scui"
    ],
    [
        "git", "submodule", "add", "git://github.com/sproutit/sproutcore.git",
        "frameworks/sproutcore"
    ],
    ["git", "submodule", "init"],
    ["git", "submodule", "sync"],
    ["git", "submodule", "update"],
    # Then Clone the Tasks GAE backend
    [
        "git", "clone",
        "git://github.com/joshholt/SproutCoreTasks-AppEngineBackend.git",
        "tasks_gae"
    ],
]


def run(appID, buildID):
    if not appID or not buildID:
        print "Please supply application indetifier and build identifier."
예제 #4
0
from helpers import cmd
import os.path

# Have to go one folder up
cmd.setBase(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

commands = [
	# Django
	cmd.relative(""),
	["git", "submodule", "init"],
	["git", "submodule", "update"],
	cmd.relative("server/dobby"),
	["git", "submodule", "init"],
	["git", "submodule", "update"],
	cmd.relative("server/djangoserver"),
	["python", "manage.py", "syncdb"],
	["python", "load_default_data.py"]
]

def run():
	cmd.run(commands)

# And run.
if __name__ == "main":
	run()
예제 #5
0
파일: setup.py 프로젝트: BRupholdt/Tasks
from helpers import cmd, filetools
import os.path

cmd.setBase(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

commands = [
  cmd.relative(""),
  # Ensure that all frameworks are present for the build later
  ["git", "submodule", "add", "git://github.com/etgryphon/sproutcore-ui.git", "frameworks/scui"],
  ["git", "submodule", "add", "git://github.com/sproutit/sproutcore.git", "frameworks/sproutcore"],
  ["git", "submodule", "init"],
  ["git", "submodule", "sync"],
  ["git", "submodule", "update"],
  # Then Clone the Tasks GAE backend
  ["git", "clone", "git://github.com/joshholt/SproutCoreTasks-AppEngineBackend.git", "tasks_gae"],
]

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
예제 #6
0
파일: update.py 프로젝트: BRupholdt/Tasks
from helpers import cmd, filetools
import os.path

cmd.setBase(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

commands = [
  cmd.relative(""),
  # Ensure that all frameworks are present for the build later
  ["git", "submodule", "init"],
  ["git", "submodule", "sync"],
  ["git", "submodule", "update"],
  # Then Clone the Tasks GAE backend
  cmd.relative("tasks_gae"),
  ["git", "pull", "origin", "master"],
]

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)
예제 #7
0
파일: update.py 프로젝트: mak1e/Tasks
from helpers import cmd, filetools
import os.path

cmd.setBase(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

commands = [
    cmd.relative(""),
    # Ensure that all frameworks are present for the build later
    ["git", "submodule", "init"],
    ["git", "submodule", "sync"],
    ["git", "submodule", "update"],
    # Then Clone the Tasks GAE backend
    cmd.relative("tasks_gae"),
    ["git", "pull", "origin", "master"],
]


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
예제 #8
0
from helpers import cmd
import os.path

cmd.setBase(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

commands = [
  
	cmd.relative("frameworks"),
	["rm", "-r", "scui"],
	["rm", "-r", "sproutcore"],
	
	cmd.relative(""),
	["rm", "-r", "tmp"],
	["rm", "-r", "tasks_gae"],
]

def run():
	cmd.run(commands)

if __name__ == "main":
	run()