Пример #1
0
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
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
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
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
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
def build(_ctx):
    """Build the service to prepare for running statically"""
    shell.run(["shards", "build", "cli", "--production"])
Пример #7
0
def build(ctx):
    """Build the service to prepare for running statically"""
    shell.run(["yarn", "build"])
Пример #8
0
def build(_ctx):
    """Build the service to prepare for running statically"""
    shell.run(["mix", "compile"])