def migratedb(command="apply"): """ Perform database migrations using Evolutions. """ require("project_path", "sudo_user") utils.play_run(env.project_path, "evolutions:%s" % command, user=env.sudo_user)
def sync_deps(): """ Download project dependencies and sync modules/lib dirs. """ require( "project_path", "http_proxy", "https_proxy", "sudo_user", ) with context_managers.proxy(env.http_proxy, env.https_proxy): utils.play_run(env.project_path, "dependencies --sync", user=env.sudo_user)
def dirty_play_test(ref=None, debug=False, dirty=True): """ Deploy LOCAL code and start app in test mode """ require("project_name","sudo_user") operations.fetch_render_copy(ref, debug, dirty, True) sync_deps() # migratedb() should not be required as new db created for tests stop_play() utils.play_run(env.project_path, "test -XX:CompileCommand=exclude,jregex/Pretokenizer,next" , user=env.sudo_user)
def sync_deps(): """ Download project dependencies and sync modules/lib dirs. Abort if there are any missing dependencies. """ require( "project_path", "http_proxy", "https_proxy", "sudo_user", ) with context_managers.proxy(env.http_proxy, env.https_proxy): out = utils.play_run(env.project_path, "dependencies --sync", user=env.sudo_user) if "WARNING" in out: abort("Missing dependencies")