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