From 35ac45b5360b2ec990efbdcf3b7cbb200801a9cd Mon Sep 17 00:00:00 2001 From: s3lph <1375407-s3lph@users.noreply.gitlab.com> Date: Fri, 14 Oct 2022 02:35:45 +0200 Subject: [PATCH] Fix release pipeline --- .gitlab-ci.yml | 10 +++------- Makefile | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e696e53..28dbf34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,11 +1,6 @@ --- image: golang:1.19 -before_script: - - export PDE_FULL_VERSION=$(git describe --tags --dirty | sed -re s/^v//) - - export PDE_VERSION=$(echo $PDE_FULL_VERSION | cut -d- -f1) - - export PDE_REVISION=$(echo $PDE_FULL_VERSION | cut -d- -f2-) - - go get -v stages: - test @@ -15,10 +10,12 @@ stages: compile: stage: test script: - - make prometheus-dnssec-exporter + - go get -v + - make prometheus-dnssec-exporter .changes artifacts: paths: - prometheus-dnssec-exporter + - .changes golangci-lint: stage: test @@ -30,7 +27,6 @@ release: image: debian:bullseye stage: release script: - - make .changes - python package/release.py only: - tags diff --git a/Makefile b/Makefile index abbe6fc..f6b1e20 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PDE_REVISION=$$(git describe --tags --dirty | cut -d- -f2-) LD_VERSION=-X 'github.com/prometheus/common/version.Version=$(PDE_VERSION)' LD_REVISION=-X 'github.com/prometheus/common/version.Revision=$(PDE_REVISION)' -LD_BRANCH=-X 'github.com/prometheus/common/version.Branch=$$(git branch | grep '*' | cut -d ' ' -f 2-)' +LD_BRANCH=-X 'github.com/prometheus/common/version.Branch=$(CI_COMMIT_REF_NAME)' LD_USER=-X 'github.com/prometheus/common/version.BuildUser=$$(whoami)@$$(hostname -f)' LD_DATE=-X 'github.com/prometheus/common/version.BuildDate=$$(date --iso-8601=seconds)' LDFLAGS=-s $(LD_VERSION) $(LD_REVISION) $(LD_BRANCH) $(LD_USER) $(LD_DATE)