pantry/projects/github.com/justwatchcom/sql_exporter/package.yml

34 lines
883 B
YAML
Raw Normal View History

2024-01-30 17:23:59 +03:00
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}}