<commit_before>---
project_name: fzf

before:
  hooks:
    - go mod download

builds:
  - id: fzf-macos
    binary: fzf
    goos:
      - darwin
    goarch:
      - amd64
    ldflags:
      - "-s -w -X main.version={{ .Version }} -X main.revision={{ .ShortCommit }}"
    hooks:
      post: |
        sh -c '
        cat > /tmp/fzf-gon-amd64.hcl << EOF
        source = ["./dist/fzf-macos_darwin_amd64_v1/fzf"]
        bundle_id = "kr.junegunn.fzf"
        apple_id {
          username = "<EMAIL>"
          password = <PASSWORD>"
        }
        sign {
          application_identity = "Developer ID Application: Junegunn Choi (Y254DRW44Z)"
        }
        zip {
          output_path = "./dist/fzf-{{ .Version }}-darwin_amd64.zip"
        }
        EOF
        gon /tmp/fzf-gon-amd64.hcl
        '

  - id: fzf-macos-arm
    binary: fzf
    goos:
      - darwin
    goarch:
      - arm64
    ldflags:
      - "-s -w -X main.version={{ .Version }} -X main.revision={{ .ShortCommit }}"
    hooks:
      post: |
        sh -c '
        cat > /tmp/fzf-gon-arm64.hcl << EOF
        source = ["./dist/fzf-macos-arm_darwin_arm64/fzf"]
        bundle_id = "kr.junegunn.fzf"
        apple_id {
          username = "<EMAIL>"
          password = <PASSWORD>"
        }
        sign {
          application_identity = "Developer ID Application: <NAME> (Y254DRW44Z)"
        }
        zip {
          output_path = "./dist/fzf-{{ .Version }}-darwin_arm64.zip"
        }
        EOF
        gon /tmp/fzf-gon-arm64.hcl
        '

  - id: fzf
    goos:
      - linux
      - windows
      - freebsd
      - openbsd
    goarch:
      - amd64
      - arm
      - arm64
    goarm:
      - 5
      - 6
      - 7
    ldflags:
      - "-s -w -X main.version={{ .Version }} -X main.revision={{ .ShortCommit }}"
    ignore:
      - goos: freebsd
        goarch: arm
      - goos: openbsd
        goarch: arm
      - goos: freebsd
        goarch: arm64
      - goos: openbsd
        goarch: arm64

archives:
  - name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
    builds:
      - fzf
    format: tar.gz
    format_overrides:
      - goos: windows
        format: zip
    files:
      - non-existent*

release:
  github:<commit_msg>Add checksums of Darwin binaries<commit_after>---
project_name: fzf

before:
  hooks:
    - go mod download

builds:
  - id: fzf-macos
    binary: fzf
    goos:
      - darwin
    goarch:
      - amd64
    ldflags:
      - "-s -w -X main.version={{ .Version }} -X main.revision={{ .ShortCommit }}"
    hooks:
      post: |
        sh -c '
        cat > /tmp/fzf-gon-amd64.hcl << EOF
        source = ["./dist/fzf-macos_darwin_amd64_v1/fzf"]
        bundle_id = "kr.junegunn.fzf"
        apple_id {
          username = "<EMAIL>"
          password = <PASSWORD>"
        }
        sign {
          application_identity = "Developer ID Application: <NAME> (Y254DRW44Z)"
        }
        zip {
          output_path = "./dist/fzf-{{ .Version }}-darwin_amd64.zip"
        }
        EOF
        gon /tmp/fzf-gon-amd64.hcl
        '

  - id: fzf-macos-arm
    binary: fzf
    goos:
      - darwin
    goarch:
      - arm64
    ldflags:
      - "-s -w -X main.version={{ .Version }} -X main.revision={{ .ShortCommit }}"
    hooks:
      post: |
        sh -c '
        cat > /tmp/fzf-gon-arm64.hcl << EOF
        source = ["./dist/fzf-macos-arm_darwin_arm64/fzf"]
        bundle_id = "kr.junegunn.fzf"
        apple_id {
          username = "<EMAIL>"
          password = <PASSWORD>"
        }
        sign {
          application_identity = "Developer ID Application: <NAME> (Y<PASSWORD>)"
        }
        zip {
          output_path = "./dist/fzf-{{ .Version }}-darwin_arm64.zip"
        }
        EOF
        gon /tmp/fzf-gon-arm64.hcl
        '

  - id: fzf
    goos:
      - linux
      - windows
      - freebsd
      - openbsd
    goarch:
      - amd64
      - arm
      - arm64
    goarm:
      - 5
      - 6
      - 7
    ldflags:
      - "-s -w -X main.version={{ .Version }} -X main.revision={{ .ShortCommit }}"
    ignore:
      - goos: freebsd
        goarch: arm
      - goos: openbsd
        goarch: arm
      - goos: freebsd
        goarch: arm64
      - goos: openbsd
        goarch: arm64

archives:
  - name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
    builds:
      - fzf
    format: tar.gz
    format_overrides:
      - goos: windows
        format: zip
    files:
      - non-existent*

checksum:
  extra_files:
    - glob: ./dist/fzf-*darwin*.zip

release:
  github:
{'fraction_non_alphanumeric': 0.1410006497725796, 'fraction_numerical': 0.01711067792939138, 'mean_word_length': 1.407716371220021, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1723739', 'n_tokens_mistral': 1790, 'n_tokens_neox': 1723, 'n_words': 348}