From 76b7f1270a6ced4b0684e6332534089e409e1c79 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Tue, 30 Jan 2024 15:23:59 +0100 Subject: [PATCH] +github.com/justwatchcom/sql_exporter --- .../justwatchcom/sql_exporter/package.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 projects/github.com/justwatchcom/sql_exporter/package.yml diff --git a/projects/github.com/justwatchcom/sql_exporter/package.yml b/projects/github.com/justwatchcom/sql_exporter/package.yml new file mode 100644 index 00000000..484620e4 --- /dev/null +++ b/projects/github.com/justwatchcom/sql_exporter/package.yml @@ -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}}