github.com/esnet/gdg@v0.6.1-0.20240412190737-6b6eba9c14d8/.goreleaser.yml (about)

     1  # This is an example .goreleaser.yml file with some sane defaults.
     2  # Make sure to check the documentation at http://goreleaser.com
     3  before:
     4    hooks:
     5      # You may remove this if you don't use go modules.
     6      - go mod tidy
     7  
     8  source:
     9    rlcp: true
    10  
    11  
    12  builds:
    13    - id: gdg
    14      env:
    15        - CGO_ENABLED=0
    16      binary: gdg
    17      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 }}
    18      main: ./cmd/gdg
    19      goos:
    20        - linux
    21        - windows
    22        - darwin
    23      goarch:
    24        - arm64
    25        - 386
    26        - amd64
    27    - id: gdg-generate
    28      env:
    29        - CGO_ENABLED=0
    30      binary: gdg-generate
    31      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 }}
    32      main: ./cmd/gdg-generate
    33      goos:
    34        - linux
    35        - windows
    36        - darwin
    37      goarch:
    38        - arm64
    39        - 386
    40        - amd64
    41  
    42  nfpms:
    43    - id: gdg
    44      package_name: gdg
    45      file_name_template: "{{ .ConventionalFileName }}"
    46      homepage: https://software.es.net/gdg/
    47      maintainer: GDG ESNet <gdg@es.net>
    48      description: |-
    49        GDG is a tool used to manage dashboards, connections, organizations and various entities of the Grafana application.
    50      license: BSD License
    51      builds:
    52        - gdg
    53        - gdg-generate
    54      formats:
    55        - apk
    56        - deb
    57        - rpm
    58  
    59      # Template to the path that the binaries should be installed.
    60      # Defaults to `/usr/bin`.
    61      bindir: /usr/bin
    62  
    63      # Section.
    64      section: default
    65  
    66      # Priority.
    67      priority: extra
    68  
    69      # Contents to add to the package.
    70      # GoReleaser will automatically add the binaries.
    71      contents:
    72        # Simple config file
    73        - src: config/importer-example.yml
    74          dst: /etc/gdg/importer.yml
    75          type: config
    76        # Simple config file
    77        - src: config/templates-example.yml
    78          dst: /etc/gdg/templates.yml
    79          type: config
    80  
    81  
    82  universal_binaries:
    83    - id: gdg
    84      name_template: gdg
    85      replace: true
    86      ids: [gdg]
    87    - id: gdg-generate
    88      name_template: gdg-generate
    89      replace: true
    90      ids: [gdg-generate]
    91  
    92  release:
    93    prerelease: auto
    94  
    95  
    96  dockers:
    97    - id: gdg
    98      #  # You can have multiple Docker images.
    99      #  - # ID of the image, needed if you want to filter by it later on (e.g. on custom publishers).
   100      goos: linux
   101      goarch: amd64
   102      #
   103      image_templates:
   104        - "ghcr.io/esnet/gdg:latest"
   105        - "ghcr.io/esnet/gdg:{{ .RawVersion }}"
   106        - "ghcr.io/esnet/gdg:{{ .Major }}.{{ .Minor }}"
   107  
   108      skip_push: false
   109      dockerfile: "docker/Dockerfile"
   110  
   111  
   112  brews:
   113    - name: gdg
   114      homepage: https://software.es.net/gdg
   115      commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
   116      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.
   117      folder: Formula
   118      repository:
   119        owner: esnet
   120        name: homebrew-gdg
   121        token: "{{ .Env.HOMEBREW_TOKEN }}"
   122        branch: main
   123      commit_author:
   124        name: GDG ESNet
   125        email: gdg@es.net
   126  
   127  archives:
   128    - name_template: >-
   129        {{ .ProjectName }}_
   130        {{- title .Os }}_
   131        {{- if eq .Arch "amd64" }}x86_64
   132        {{- else if eq .Arch "386" }}i386
   133        {{- else }}{{ .Arch }}{{ end }}
   134      format_overrides:
   135        - goos: windows
   136          format: zip
   137      builds:
   138        - gdg
   139        - gdg-generate
   140      files:
   141        - README*
   142        - config/importer-example.yml
   143        - config/templates-example.yml
   144  
   145  checksum:
   146    name_template: "checksums.txt"
   147  snapshot:
   148    name_template: "{{ .Tag }}-next"
   149  changelog:
   150    sort: asc
   151    filters:
   152      exclude:
   153        - "^docs:"
   154        - "^test:"