awl/.goreleaser.yaml
Sam Therapy 40278ed22f
Some checks failed
Forgejo Release / release (push) Failing after 1m6s
Mirror Push / mirror (push) Successful in 6s
Test / test (oldstable) (push) Successful in 45s
Test / test (stable) (push) Successful in 38s
chore: Add Snap and Docker with Goreleaser
Why not though snap sucks and docker seems kind of pointless since this is just a static file

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2024-04-17 19:00:51 +02:00

236 lines
6.1 KiB
YAML

# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
- make clean
- go mod tidy
# Make manpages
- docs/makeman.sh
# Vendor dependencies
- go mod vendor
builds:
- env:
- CGO_ENABLED=0
targets:
- go_first_class
- plan9_amd64
- freebsd_amd64
universal_binaries:
- replace: true
archives:
- files:
- LICENSE
- completions/**
- docs/awl.1.gz
name_template: >-
{{ .ProjectName }}_
{{- if eq .Os "darwin" }}MacOS_
{{- else if eq .Os "freebsd" }}FreeBSD_
{{- else }}{{- title .Os }}_{{ end }}
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "mips64" }}mips64_hardfloat
{{- else if eq .Arch "mips64le" }}mips64le_hardfloat
{{- else }}{{ .Arch }}{{ end -}}
format_overrides:
- goos: windows
format: zip
- files:
- vendor/**
id: vendor
format: tar.xz
name_template: "{{ .ProjectName }}-{{ .Version }}-deps"
meta: true
wrap_in_directory: "{{ .ProjectName }}"
nfpms:
- id: packages
package_name: awl-dns
vendor: Sam Therapy <sam@samtherapy.net>
maintainer: Sam Therapy <sam@samtherapy.net>
homepage: https://dns.froth.zone/awl
description: |-
Command-line DNS query tool.
Awl supports DNS-over-[UDP,TCP,HTTPS,QUIC] and DNSCrypt.
license: BSD-3-Clause
section: utils
bindir: /usr/bin
formats:
- apk
- archlinux
- deb
- rpm
contents:
- src: completions/bash.bash
dst: /usr/share/bash-completion/completions/awl
- src: docs/awl.1.gz
dst: /usr/share/man/man1/awl.1.gz
- src: LICENSE
dst: /usr/share/docs/awl/copyright
- src: completions/fish.fish
dst: /usr/share/fish/vendor_completions.d/awl.fish
# DEB only
- src: completions/zsh.zsh
dst: /usr/share/zsh/vendor-completions/_awl
packager: deb
# Alpine .apk only
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: apk
# RPM only
- src: completions/zsh.zsh
dst: /usr/share/zsh/site-functions/_awl
packager: rpm
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package
overrides:
deb:
file_name_template: >-
{{- .PackageName }}_
{{- .Version }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "arm" }}armel
{{- else }}{{ .Arch }}{{ end -}}
rpm:
file_name_template: >-
{{- .PackageName }}-
{{- .Version }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i686
{{- else if eq .Arch "arm" }}armhfp
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end -}}
- id: termux
package_name: awl-dns
vendor: Sam Therapy <sam@samtherapy.net>
maintainer: Sam Therapy <sam@samtherapy.net>
homepage: https://dns.froth.zone/awl
description: |-
Command-line DNS query tool.
Awl supports DNS-over-[UDP,TCP,HTTPS,QUIC] and DNSCrypt.
license: BSD-3-Clause
section: utils
formats:
- termux.deb
file_name_template: >-
{{- .PackageName }}_
{{- .Version }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i686
{{- else if eq .Arch "arm" }}arm
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end -}}
snapcrafts:
-
name: awl-dns
grade: stable
publish: true
summary: A command-line DNS query tool
description: |-
Awl is a command-line DNS query tool.
Awl supports DNS-over-[UDP,TCP,HTTPS,QUIC] and DNSCrypt.
confinement: strict
license: BSD-3-Clause
base: bare
apps:
awl-dns:
command: awl
plugs:
- network
completer: completions/bash.bash
dockers:
-
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}"
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
brews:
- repository:
owner: packaging
name: homebrew
homepage: https://dns.froth.zone/awl
description: A DNS query tool
license: BSD-3-Clause
# custom_block: |
# head "https://git.froth.zone/sam/awl.git"
install: |-
bin.install "awl"
bash_completion.install "completions/bash.bash" => "awl"
zsh_completion.install "completions/zsh.zsh" => "_awl"
fish_completion.install "completions/fish.fish" => "awl.fish"
man1.install "docs/awl.1.gz"
nix:
- repository:
owner: packaging
name: nur
homepage: https://dns.froth.zone/awl
description: A DNS query client
license: bsd3
extra_install: |-
installManPage ./docs/awl.1.gz
installShellCompletion ./completions/*
scoops:
- repository:
owner: packaging
name: scoop
folder: bucket
homepage: https://dns.froth.zone/awl
description: A DNS query client
license: BSD-3-Clause
changelog:
sort: asc
groups:
- title: "Dependency Updates"
regexp: "^.*fix\\(deps\\)*:+.*$"
order: 2
- title: "Features"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: "Bug fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: "Other"
order: 999
filters:
exclude:
- "^test:"
- "^docs?:"
- "typo"
- "^ci:"
uploads:
- name: packages
method: PUT
mode: archive
exts:
- deb
- rpm
- apk
- termux.deb
username: sam
target: >-
https://git.froth.zone/api/packages/sam/
{{- if eq .ArtifactExt "deb" }}debian/pool/sid/main/upload
{{- else if eq .ArtifactExt "termux.deb" }}debian/pool/termux/main/upload
{{- else if eq .ArtifactExt "rpm" }}rpm/upload
{{- else if eq .ArtifactExt "apk" }}alpine/edge/main{{ end -}}
custom_artifact_name: true # Truncate the artifact name from the upload URL
gitea_urls:
api: https://git.froth.zone/api/v1
download: https://git.froth.zone