From c17010f0e6d72942aa11ae41e4219b0423a864d2 Mon Sep 17 00:00:00 2001 From: Samir Faci Date: Mon, 12 Feb 2024 09:33:43 -0500 Subject: [PATCH] Saving state --- .goreleaser.yml | 66 ++----------------- goreleaser.original | 150 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 61 deletions(-) create mode 100644 goreleaser.original diff --git a/.goreleaser.yml b/.goreleaser.yml index 3d5c8a33..f8447dcd 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,10 +1,6 @@ -# This is an example .goreleaser.yml file with some sane defaults. -# Make sure to check the documentation at http://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 ./... source: @@ -41,46 +37,6 @@ builds: - amd64 -nfpms: - - id: gdg - package_name: gdg - file_name_template: "{{ .ConventionalFileName }}" - homepage: https://software.es.net/gdg/ - maintainer: GDG ESNet - description: |- - GDG is a tool used to manage dashboards, connections, organizations and various entities of the Grafana application. - license: BSD License - builds: - - gdg - - gdg-generate - formats: - - apk - - deb - - rpm - - # Template to the path that the binaries should be installed. - # Defaults to `/usr/bin`. - bindir: /usr/bin - - # Section. - section: default - - # Priority. - priority: extra - - # Contents to add to the package. - # GoReleaser will automatically add the binaries. - contents: - # Simple config file - - src: config/importer-example.yml - dst: /etc/gdg/importer.yml - type: config - # Simple config file - - src: config/templates-example.yml - dst: /etc/gdg/templates.yml - type: config - - universal_binaries: - replace: true @@ -88,22 +44,6 @@ release: prerelease: auto -dockers: - - id: gdg - # # You can have multiple Docker images. - # - # ID of the image, needed if you want to filter by it later on (e.g. on custom publishers). - goos: linux - goarch: amd64 - # - image_templates: - - "ghcr.io/esnet/gdg:latest" - - "ghcr.io/esnet/gdg:{{ .RawVersion }}" - - "ghcr.io/esnet/gdg:{{ .Major }}.{{ .Minor }}" - - skip_push: false - dockerfile: "docker/Dockerfile" - - brews: - name: gdg homepage: https://software.es.net/gdg @@ -126,7 +66,10 @@ archives: {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} - allow_different_binary_count: true + allow_different_binary_count: false + format_overrides: + - goos: windows + format: zip builds: - gdg - gdg-generate @@ -145,3 +88,4 @@ changelog: exclude: - "^docs:" - "^test:" + diff --git a/goreleaser.original b/goreleaser.original new file mode 100644 index 00000000..ce947dc5 --- /dev/null +++ b/goreleaser.original @@ -0,0 +1,150 @@ +# This is an example .goreleaser.yml file with some sane defaults. +# Make sure to check the documentation at http://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 ./... + +source: + rlcp: true + +builds: + - id: gdg + env: + - CGO_ENABLED=0 + binary: gdg + ldflags: -s -w -X github.com/esnet/gdg/internal/version.GitCommit={{ .Commit }} -X github.com/esnet/gdg/internal/version.BuildDate={{ .Date }} -X github.com/esnet/gdg/internal/version.Version={{ .Tag }} + main: ./cmd/gdg + goos: + - linux + - windows + - darwin + goarch: + - arm64 + - 386 + - amd64 + - id: gdg-generate + env: + - CGO_ENABLED=0 + binary: gdg-generate + ldflags: -s -w -X github.com/esnet/gdg/internal/version.GitCommit={{ .Commit }} -X github.com/esnet/gdg/internal/version.BuildDate={{ .Date }} -X github.com/esnet/gdg/internal/version.Version={{ .Tag }} + main: ./cmd/gen + goos: + - linux + - windows + - darwin + goarch: + - arm64 + - 386 + - amd64 + + +#nfpms: +# - id: gdg +# package_name: gdg +# file_name_template: "{{ .ConventionalFileName }}" +# homepage: https://software.es.net/gdg/ +# maintainer: GDG ESNet +# description: |- +# GDG is a tool used to manage dashboards, connections, organizations and various entities of the Grafana application. +# license: BSD License +# builds: +# - gdg +# - gdg-generate +# formats: +# - apk +# - deb +# - rpm +# +# # Template to the path that the binaries should be installed. +# # Defaults to `/usr/bin`. +# bindir: /usr/bin +# +# # Section. +# section: default +# +# # Priority. +# priority: extra +# +# # Contents to add to the package. +# # GoReleaser will automatically add the binaries. +# contents: +# # Simple config file +# - src: config/importer-example.yml +# dst: /etc/gdg/importer.yml +# type: config +# # Simple config file +# - src: config/templates-example.yml +# dst: /etc/gdg/templates.yml +# type: config + + +universal_binaries: + - replace: true + +release: + prerelease: auto + + +#dockers: +# - id: gdg +# # # You can have multiple Docker images. +# # - # ID of the image, needed if you want to filter by it later on (e.g. on custom publishers). +# goos: linux +# goarch: amd64 +# # +# image_templates: +# - "ghcr.io/esnet/gdg:latest" +# - "ghcr.io/esnet/gdg:{{ .RawVersion }}" +# - "ghcr.io/esnet/gdg:{{ .Major }}.{{ .Minor }}" +# +# skip_push: false +# dockerfile: "docker/Dockerfile" + + +brews: + - name: gdg + homepage: https://software.es.net/gdg + commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" + description: Grafana Dash-n-Grab (GDG) -- Dashboard/DataSource Manager for grafana supporting backup/restore to local filesystem, s3, gcs, azure, and other S3 compatible storage engines. + folder: Formula + repository: + owner: esnet + name: homebrew-gdg + token: "{{ .Env.HOMEBREW_TOKEN }}" + branch: main + commit_author: + name: GDG ESNet + email: gdg@es.net + +archives: + - name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + allow_different_binary_count: true + format_overrides: + - goos: windows + format: zip + builds: + - gdg + - gdg-generate + files: + - README* + - config/importer-example.yml + - config/templates-example.yml + +checksum: + name_template: "checksums.txt" +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:"