distributable:
  url: https://github.com/mat2cc/redis_tui/archive/refs/tags/v{{version}}.tar.gz
  strip-components: 1

versions:
  github: mat2cc/redis_tui
  strip: /v/

build:
  dependencies:
    go.dev: ^1.20
  script:
    - go build -ldflags="$LDFLAGS" -o "{{prefix}}"/bin/ ./...
  env:
    LDFLAGS:
      - -s
      - -w
    linux:
      LDFLAGS:
        - -buildmode=pie

provides:
  - bin/redis_tui

test: 'echo "$(redis_tui 2>&1 || true)" | grep "connect: connection refused"'
