distributable:
  url: https://github.com/k0sproject/k0sctl/archive/refs/tags/{{version.tag}}.tar.gz
  strip-components: 1

versions:
  github: k0sproject/k0sctl

build:
  dependencies:
    go.dev: ^1.21
  script:
    - make k0sctl TAG_NAME={{version.tag}}
    - install -D k0sctl {{prefix}}/bin/k0sctl

provides:
  - bin/k0sctl

test:
  - k0sctl version 2>&1 | grep {{version}}
  - k0sctl init root@10.0.0.1 2>&1 | grep 'k0s-cluster'
