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

display-name: air

versions:
  github: cosmtrek/air

provides:
  - bin/air

build:
  script:
    # otherwise it breaks the go compiler's brain
    - run: unset LDFLAGS
      if: darwin
    - make build
    - mkdir -p "{{ prefix }}"/bin
    - mv air "{{ prefix }}"/bin
  env:
    linux:
      LDFLAGS:
        - -buildmode=pie
  dependencies:
    git-scm.org: '*'
    go.dev: ^1.22

test: air -v
