+github.com/justwatchcom/sql_exporter

This commit is contained in:
tannevaled 2024-01-30 15:23:59 +01:00 committed by Jacob Heider
parent e96cd691d0
commit 76b7f1270a

View file

@ -0,0 +1,33 @@
distributable:
url: https://github.com/justwatchcom/sql_exporter/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
display-name: justwatchcom/sql_exporter
versions:
github: free/sql_exporter
strip:
- /^v/
build:
dependencies:
git-scm.org: '*'
go.dev: ^1.21
env:
CGO_ENABLED: 0
LDFLAGS:
- -s
- -w
- -X github.com/prometheus/common/version.Version="{{version}}"
- -X github.com/prometheus/common/version.Branch="$( git branch --show-current )"
- -X github.com/prometheus/common/version.BuildUser="${USER}"
- -X github.com/prometheus/common/version.BuildDate="$(date +%Y-%m-%d %H:%M:%S)"
linux:
LDFLAGS:
- -buildmode=pie
script: go build -v -ldflags="${LDFLAGS}" -o {{prefix}}/bin/sql_exporter
provides:
- bin/sql_exporter
test: test "$(sql_exporter --version|head -1|cut -d' ' -f 3)" = {{version}}