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

versions:
  github: kubernetes/minikube/releases/tags

provides:
  - bin/minikube

dependencies:
  kubernetes.io/kubectl: '*'

build:
  dependencies:
    go.dev: ^1.19
    github.com/kevinburke/go-bindata: '*'
  script:
    - run: |
        sed -E -i.bak -e's/(_LDFLAGS := "?)/\1-buildmode=pie /' Makefile
        rm Makefile.bak
      if: linux
    - make
    - mkdir -p "{{ prefix }}"/bin
    - mv out/minikube "{{ prefix }}"/bin

test:
  script: |
    minikube version