コード例 #1
0
ファイル: api.py プロジェクト: fifteenfortyfive/website
def deps(_ctx):
    """Install tooling and dependencies for the service"""
    log.progress("Installing Crystal")
    result = shell.run(["asdf", "install"])

    if result.returncode != 0:
        log.error("Failed to install Crystal")
        exit(1)

    log.progress("Installing depdencies")
    result = shell.run(["shards", "update"])

    if result.returncode != 0:
        log.error("Failed to install dependencies")
        exit(1)

    log.progress("Building sentry watcher")
    result = shell.run([
        "crystal", "build", "--release", "./dev/sentry_cli.cr", "-o",
        "./sentry"
    ])

    if result.returncode != 0:
        log.error("Failed to install dependencies")
        exit(1)
コード例 #2
0
ファイル: api.py プロジェクト: fifteenfortyfive/website
def start(_ctx):
    """
    Start the service as a subprocess and let it run.

    This command should not daemonize the process and instead should let it
    run directly, outputting to the console as if the command was invoked
    directly.
    """
    shell.run(["./sentry"])
コード例 #3
0
ファイル: web.py プロジェクト: fifteenfortyfive/website
def start(ctx):
    """
    Start yarn as a subprocess and let it run.

    This command should not daemonize the process and instead should let it
    run directly, outputting to the console as if the command was invoked
    directly.
    """
    shell.run(["yarn", "serve"])
コード例 #4
0
ファイル: web.py プロジェクト: fifteenfortyfive/website
def deps(_ctx):
    """Install tooling and dependencies for the service"""
    log.progress("Installing Node")
    result = shell.run(["asdf", "install"])
    if result.returncode != 0:
        log.error("Failed to install Node")
        exit(1)

    log.progress("Installing depdencies")
    result = shell.run(["yarn", "install"])
    if result.returncode != 0:
        log.error("Failed to install dependencies")
        exit(1)
コード例 #5
0
ファイル: runs.py プロジェクト: fifteenfortyfive/website
def deps(_ctx):
    """Install tooling and dependencies for the service"""
    log.progress("Updating dependencies")
    shell.run(["mix", "deps.get"])

    log.progress("Running database migrations")
    shell.run(["mix", "ecto.setup"])
    shell.run(["mix", "do", "event_store.create,", "event_store.init"])
    test_env = os.environ.copy()
    test_env["MIX_ENV"] = "test"
    shell.run(["mix", "ecto.setup"], env=test_env)
コード例 #6
0
ファイル: api.py プロジェクト: fifteenfortyfive/website
def build(_ctx):
    """Build the service to prepare for running statically"""
    shell.run(["shards", "build", "cli", "--production"])
コード例 #7
0
ファイル: web.py プロジェクト: fifteenfortyfive/website
def build(ctx):
    """Build the service to prepare for running statically"""
    shell.run(["yarn", "build"])
コード例 #8
0
ファイル: runs.py プロジェクト: fifteenfortyfive/website
def build(_ctx):
    """Build the service to prepare for running statically"""
    shell.run(["mix", "compile"])