import '../just/go.just'

# Build ldflags string
_LDFLAGSSTRING := "'" + trim(
    "-X main.GitCommit=" + GITCOMMIT + " " + \
    "-X main.GitDate=" + GITDATE + " " + \
    "-X main.Version=" + VERSION + " " + \
    "") + "'"

BINARY := "./bin/op-conductor"

# Build op-conductor binary
op-conductor: (go_build BINARY "./cmd" "-ldflags" _LDFLAGSSTRING)

# Clean build artifacts
clean:
    rm -f {{BINARY}}

# Run tests
test: (go_test "./...")

# Generate mocks
generate-mocks: (go_generate "./...")