mirror of
https://github.com/garethgeorge/backrest.git
synced 2025-10-30 12:17:03 +00:00
210 lines
5.8 KiB
YAML
210 lines
5.8 KiB
YAML
# This is an example .goreleaser.yml file with some sensible defaults.
|
|
# Make sure to check the documentation at https://goreleaser.com
|
|
|
|
# The lines below are called `modelines`. See `:help modeline`
|
|
# Feel free to remove those if you don't want/need to use them.
|
|
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
|
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|
|
|
|
version: 1
|
|
|
|
env:
|
|
- BACKREST_BUILD_VERSION={{.Version}}
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
- pnpm --prefix webui install
|
|
- sh -c "GOOS=linux BACKREST_BUILD_VERSION={{.Version}} go generate ./..."
|
|
- sh -c "GOOS=windows BACKREST_BUILD_VERSION={{.Version}} go generate ./..."
|
|
|
|
builds:
|
|
- id: other
|
|
main: ./cmd/backrest
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- darwin
|
|
- windows
|
|
- freebsd
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
ldflags:
|
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
|
- id: linux
|
|
main: ./cmd/backrest
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
- arm
|
|
ldflags:
|
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
|
- id: backrestmon
|
|
main: ./cmd/backrestmon
|
|
binary: backrest-windows-tray
|
|
env:
|
|
- CGO_ENABLED=1
|
|
- GO111MODULE=on
|
|
ldflags: -H=windowsgui
|
|
goos:
|
|
- windows
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
|
|
archives:
|
|
- format: tar.gz
|
|
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 }}
|
|
format_overrides:
|
|
- goos: windows
|
|
format: zip
|
|
files:
|
|
- install.sh
|
|
- uninstall.sh
|
|
- LICENSE
|
|
- README.md
|
|
- CHANGELOG.md
|
|
allow_different_binary_count: true
|
|
|
|
dockers:
|
|
- image_templates:
|
|
- garethgeorge/backrest:{{ .Tag }}-alpine-amd64
|
|
dockerfile: Dockerfile.alpine
|
|
use: buildx
|
|
build_flag_templates:
|
|
- "--pull"
|
|
- "--platform=linux/amd64"
|
|
extra_files:
|
|
- ./
|
|
|
|
- image_templates:
|
|
- garethgeorge/backrest:{{ .Tag }}-alpine-arm64
|
|
dockerfile: Dockerfile.alpine
|
|
goarch: arm64
|
|
use: buildx
|
|
build_flag_templates:
|
|
- "--pull"
|
|
- "--platform=linux/arm64/v8"
|
|
extra_files:
|
|
- ./
|
|
|
|
- image_templates:
|
|
- garethgeorge/backrest:{{ .Tag }}-scratch-arm64
|
|
dockerfile: Dockerfile.scratch
|
|
goarch: arm64
|
|
use: buildx
|
|
build_flag_templates:
|
|
- "--pull"
|
|
- "--platform=linux/arm64/v8"
|
|
extra_files:
|
|
- ./
|
|
|
|
- image_templates:
|
|
- garethgeorge/backrest:{{ .Tag }}-scratch-amd64
|
|
dockerfile: Dockerfile.scratch
|
|
use: buildx
|
|
build_flag_templates:
|
|
- "--pull"
|
|
- "--platform=linux/amd64"
|
|
extra_files:
|
|
- ./
|
|
|
|
- image_templates:
|
|
- garethgeorge/backrest:{{ .Tag }}-scratch-armv6
|
|
dockerfile: Dockerfile.scratch
|
|
use: buildx
|
|
goarch: arm
|
|
goarm: 6
|
|
build_flag_templates:
|
|
- "--pull"
|
|
- "--platform=linux/arm/v6"
|
|
extra_files:
|
|
- ./
|
|
|
|
docker_manifests:
|
|
- name_template: "garethgeorge/backrest:latest"
|
|
image_templates:
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
|
|
- name_template: "garethgeorge/backrest:v{{ .Major }}"
|
|
image_templates:
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
|
|
- name_template: "garethgeorge/backrest:v{{ .Major }}.{{ .Minor }}"
|
|
image_templates:
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
|
|
- name_template: "garethgeorge/backrest:{{ .Tag }}"
|
|
image_templates:
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
|
|
- name_template: "garethgeorge/backrest:latest-alpine"
|
|
image_templates:
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-amd64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-alpine-arm64"
|
|
- name_template: "garethgeorge/backrest:scratch"
|
|
image_templates:
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-amd64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-arm64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-armv6"
|
|
- name_template: "garethgeorge/backrest:v{{ .Major }}-scratch"
|
|
image_templates:
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-amd64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-arm64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-armv6"
|
|
- name_template: "garethgeorge/backrest:v{{ .Major }}.{{ .Minor }}-scratch"
|
|
image_templates:
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-amd64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-arm64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-armv6"
|
|
- name_template: "garethgeorge/backrest:{{ .Tag }}-scratch"
|
|
image_templates:
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-amd64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-arm64"
|
|
- "garethgeorge/backrest:{{ .Tag }}-scratch-armv6"
|
|
|
|
brews:
|
|
- name: backrest
|
|
homepage: https://github.com/garethgeorge/backrest
|
|
description: "Backrest is a web UI and orchestrator for restic backup."
|
|
|
|
url_template: "https://github.com/garethgeorge/backrest/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
|
|
|
|
commit_author:
|
|
name: goreleaserbot
|
|
email: bot@goreleaser.com
|
|
|
|
repository:
|
|
owner: garethgeorge
|
|
name: homebrew-backrest-tap
|
|
branch: main
|
|
token: "{{ .Env.HOMEBREW_GITHUB_TOKEN }}"
|
|
|
|
service: |
|
|
run opt_bin/"backrest"
|
|
error_log_path var/"log/backrest.log"
|
|
log_path var/"log/backrest.log"
|
|
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- "^docs:"
|
|
- "^test:"
|
|
|
|
release:
|
|
github:
|
|
owner: garethgeorge
|
|
name: backrest
|