project_name: nv

before:
  hooks:
    - go mod tidy

builds:
  - <<: &build_defaults
      binary: nv
      main: ./cmd/nv/
      env:
        - CGO_ENABLE=0
      ldflags:
        - -s -w -X github.com/jcouture/nv/internal/build.Version={{.Version}} -X github.com/jcouture/nv/internal/build.Date={{time "2006-01-02"}}
    id: macos
    goos: [darwin]
    goarch: [amd64, arm64]
  
  - <<: *build_defaults
    id: linux
    goos: [linux]
    goarch: [386, arm, amd64, arm64]

  - <<: *build_defaults
    id: windows
    goos: [windows]
    goarch: [386, amd64]

changelog:
  sort: asc
  filters:
    exclude:
      - '^docs:'
      - '^test:'

brews:
  -
    tap:
      owner: jcouture
      name: homebrew-nv
    folder: Formula
    homepage:  https://github.com/jcouture/nv
    description: Lightweight utility to load context specific environment variables
    test: |
      system "#{bin}/nv"
project_name: nv

before:
  hooks:
    - go mod tidy

builds:
  - <<: &build_defaults
      binary: nv
      main: ./cmd/nv/
      env:
        - CGO_ENABLE=0
      ldflags:
        - -s -w -X github.com/jcouture/nv/internal/build.Version={{.Version}} -X github.com/jcouture/nv/internal/build.Date={{time "2006-01-02"}}
    id: macos
    goos: [darwin]
    goarch: [amd64, arm64]
  
  - <<: *build_defaults
    id: linux
    goos: [linux]
    goarch: [386, arm, amd64, arm64]

  - <<: *build_defaults
    id: windows
    goos: [windows]
    goarch: [386, amd64, arm]

checksum:
  name_template: 'checksums.txt'

changelog:
  sort: asc
  filters:
    exclude:
      - '^docs:'
      - '^test:'

brews:
  -
    tap:
      owner: jcouture
      name: homebrew-nv
    folder: Formula
    homepage:  https://github.com/jcouture/nv
    description: Lightweight utility to load context specific environment variables
    test: |
      system "#{bin}/nv"
Make sure to produce an ARM binary on Windows.
Make sure to produce an ARM binary on Windows.
