hcloud-upload-image/.goreleaser.yaml

131 lines
3.7 KiB
YAML
Raw Permalink Normal View History

2024-05-05 00:37:08 +02:00
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2
2024-05-05 00:37:08 +02:00
before:
hooks:
- ./scripts/completions.sh
2024-05-05 00:37:08 +02:00
builds:
- id: default
env:
2024-05-05 00:37:08 +02:00
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags:
- -X {{ .ModulePath }}/internal/version.version={{ .Version }}
- -X {{ .ModulePath }}/internal/version.versionPrerelease=
2024-05-05 00:37:08 +02:00
archives:
- formats: [ "tar.gz" ]
2024-05-05 00:37:08 +02:00
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
formats: [ "zip" ]
2024-05-05 00:37:08 +02:00
files:
- README.md
- LICENSE
- completions/*
nfpms:
- id: default
file_name_template: "{{ .ConventionalFileName }}"
package_name: hcloud-upload-image
vendor: Julian Tölle
homepage: https://github.com/apricote/hcloud-upload-image
maintainer: Julian Tölle <julian.toelle97@gmail.com>
formats:
- deb
- rpm
- apk
description: Manage custom OS images on Hetzner Cloud.
license: MIT
dependencies:
- openssh
recommends:
- hcloud-cli
contents:
- src: ./completions/hcloud-upload-image.bash
dst: /usr/share/bash-completion/completions/hcloud-upload-image
file_info:
mode: 0644
- src: ./completions/hcloud-upload-image.fish
dst: /usr/share/fish/vendor_completions.d/hcloud-upload-image.fish
file_info:
mode: 0644
- src: ./completions/hcloud-upload-image.zsh
dst: /usr/share/zsh/vendor-completions/_hcloud-upload-image
file_info:
mode: 0644
- src: ./LICENSE
dst: /usr/share/doc/hcloud-upload-image/license
file_info:
mode: 0644
aurs:
- name: hcloud-upload-image-bin
homepage: "https://github.com/apricote/hcloud-upload-image"
description: Manage custom OS images on Hetzner Cloud.
maintainers:
- "Julian Tölle <julian.toelle97@gmail.com>"
license: MIT
private_key: "{{ .Env.AUR_SSH_KEY }}"
git_url: "ssh://aur@aur.archlinux.org/hcloud-upload-image-bin.git"
depends:
- openssh
package: |-
# bin
install -Dm755 "./hcloud-upload-image" "${pkgdir}/usr/bin/hcloud-upload-image"
# license
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/hcloud-upload-image/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./completions/hcloud-upload-image.bash" "${pkgdir}/usr/share/bash-completion/completions/hcloud-upload-image"
install -Dm644 "./completions/hcloud-upload-image.zsh" "${pkgdir}/usr/share/zsh/site-functions/_hcloud-upload-image"
install -Dm644 "./completions/hcloud-upload-image.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/hcloud-upload-image.fish"
kos:
- id: container-images
build: default
repositories:
- ghcr.io/apricote
platforms:
- linux/amd64
- linux/arm64
base_import_paths: true
labels:
org.opencontainers.image.source: https://github.com/apricote/hcloud-upload-image
tags:
- latest
- "{{.Tag}}"
snapshot:
version_template: "{{ .Version }}-dev+{{ .ShortCommit }}"
2024-05-05 00:37:08 +02:00
changelog:
# Generated by release-please
disable: true