-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating GoReleaser to update commit, builddate, and version correclty
- Loading branch information
1 parent
ca5a1cd
commit a7b4a69
Showing
104 changed files
with
21,487 additions
and
1,062 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
test: | ||
strategy: | ||
matrix: | ||
go: [ {version: 1.21.3, token: 1}, {version: 1.21.3, token: 0}] | ||
go: [ {version: 1.21.5, token: 1}, {version: 1.21.5, token: 0}] | ||
grafana: [ 10.1.4 ] | ||
|
||
env: | ||
|
@@ -20,14 +20,14 @@ jobs: | |
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go.version }} | ||
- name: Verify go version | ||
run: go version | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
|
@@ -40,11 +40,11 @@ jobs: | |
run: | | ||
echo "token IS $TEST_TOKEN_CONFIG" | ||
- name: Calc coverage | ||
if: "${{ matrix.go.version == '1.21.3' && matrix.grafana == '10.1.4' && matrix.go.token == '0' }}" | ||
if: "${{ matrix.go.version == '1.21.5' && matrix.grafana == '10.1.4' && matrix.go.token == '0' }}" | ||
run: | | ||
go test -v -covermode=atomic -coverprofile=coverage.out ./... | ||
- name: Convert coverage.out to coverage.lcov | ||
if: "${{ matrix.go.version == '1.21.3' && matrix.grafana == '10.1.4' && matrix.go.token == '0' }}" | ||
if: "${{ matrix.go.version == '1.21.5' && matrix.grafana == '10.1.4' && matrix.go.token == '0' }}" | ||
uses: jandelgado/[email protected] | ||
- name: Test | ||
if: "${{ matrix.go.token == '1' }}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,32 +4,53 @@ 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: | ||
- env: | ||
- id: gdg | ||
env: | ||
- CGO_ENABLED=0 | ||
binary: gdg | ||
ldflags: -s -w -X github.com/esnet/gdg/version.GitCommit={{ .Commit }} -X github.com/esnet/gdg/version.BuildDate={{ .Date }} -X github.com/esnet/gdg/version.Version={{ .Tag }} | ||
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 | ||
- 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, datasources, orgs and various entities of the Grafana application. | ||
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 | ||
|
@@ -52,57 +73,72 @@ nfpms: | |
- 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 | ||
|
||
|
||
# ids: [ gdg gdg-generate ] | ||
universal_binaries: | ||
- replace: true | ||
ids: | ||
- gdg | ||
- gdg-generate | ||
|
||
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). | ||
- 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-gorelease" | ||
dockerfile: "docker/Dockerfile" | ||
|
||
|
||
brews: | ||
- | ||
name: | ||
- 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. | ||
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 | ||
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 }} | ||
files: | ||
- 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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
with-expecter: true | ||
recursive: false | ||
all: true | ||
dir: "{{.InterfaceDir}}/mocks" | ||
outpkg: "mocks" | ||
filename: "{{.InterfaceName}}.go" | ||
mockname: "{{.InterfaceName}}" | ||
packages: | ||
github.com/esnet/gdg/internal/service: | ||
config: | ||
all: true | ||
dir: "{{.InterfaceDir}}/mocks" | ||
outpkg: "mocks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.