class Runcobo::Tasks::Dbmate

Overview

Resolves dbmate for database commands. The pinned release is downloaded only when a command needs it and no installed copy is available, so installing Runcobo as a library never downloads development tools.

Defined in:

tasks/dbmate.cr

Constant Summary

INSTALLER = {{ read_file("/home/runner/work/runcobo/runcobo/src/tasks/../../scripts/install-dbmate.sh") }}

Constructors

Instance Method Summary

Constructor Detail

def self.new(root : Path, runner : Runner = Runner.new, path : String | Nil = ENV["PATH"]?) #

[View source]

Instance Method Detail

def cached : Path #

Project-local copy installed on first use.


[View source]
def executable : String #

Prefers runcobo-dbmate beside cobo (from make install), then dbmate on the search path, then the project-local pinned copy.


[View source]
def install : Nil #

The installer exits early when the cached binary matches the pinned checksum, and the lock keeps concurrent commands from racing.


[View source]