Skip to content

Commit

Permalink
Saving state
Browse files Browse the repository at this point in the history
  • Loading branch information
safaci2000 committed Feb 12, 2024
1 parent b619564 commit c17010f
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 61 deletions.
66 changes: 5 additions & 61 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -41,69 +37,13 @@ builds:
- amd64


nfpms:
- id: gdg
package_name: gdg
file_name_template: "{{ .ConventionalFileName }}"
homepage: https://software.es.net/gdg/
maintainer: GDG ESNet <[email protected]>
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
Expand All @@ -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
Expand All @@ -145,3 +88,4 @@ changelog:
exclude:
- "^docs:"
- "^test:"

150 changes: 150 additions & 0 deletions goreleaser.original
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
# 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: [email protected]

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:"

0 comments on commit c17010f

Please sign in to comment.