From edcf4b04e3c32859db138552b39e93bb56b96046 Mon Sep 17 00:00:00 2001 From: Alexey Roytman Date: Mon, 21 Aug 2023 09:10:57 +0300 Subject: [PATCH] Fix .goreleaser.yml file (#260) The `archives.replacements` durective of the .goreleaser.yaml file has been deprecated since 2022-11-24 (v1.14.0) and now removed in v1.19.0. Therefore the .goreleaser.yaml file has to be updated. Signed-off-by: Alexey Roytman --- .gitignore | 2 ++ .goreleaser.yaml | 45 +++++++++++++++++++++++++++++++++++++++++++++ .goreleaser.yml | 46 ---------------------------------------------- 3 files changed, 47 insertions(+), 46 deletions(-) create mode 100644 .goreleaser.yaml delete mode 100644 .goreleaser.yml diff --git a/.gitignore b/.gitignore index 4bba19f..dc50a68 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ out/ .vscode .history .netrc + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..a65edfe --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,45 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + +archives: + - format: tar.gz + # 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 + format: zip +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + +# The lines beneath this are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj diff --git a/.goreleaser.yml b/.goreleaser.yml deleted file mode 100644 index 4bd0cb2..0000000 --- a/.goreleaser.yml +++ /dev/null @@ -1,46 +0,0 @@ -# This is an example .goreleaser.yml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com -before: - hooks: - - go mod tidy -builds: - - env: - - CGO_ENABLED=0 - goos: - - linux - - windows - - darwin -release: - draft: true -archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 - format_overrides: - - goos: windows - format: zip -checksum: - name_template: 'checksums.txt' -snapshot: - name_template: "{{ .Tag }}-next" -dockers: - - image_templates: - - "ghcr.io/fybrik/{{.ProjectName}}:latest" - - "ghcr.io/fybrik/{{.ProjectName}}:{{ .Version }}" - goos: linux - goarch: amd64 - build_flag_templates: - - --platform=linux/amd64 -changelog: - sort: asc - filters: - exclude: - - '^ci:' - - '^docs:' - - '^test:' - - '^style:' - - '^refactor:' - - '^build(deps):'