diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..e7a46284 --- /dev/null +++ b/VERSION @@ -0,0 +1,2 @@ +VERSION=1.2.0 +REVISION=1~bpo+1 diff --git a/debian/changelog b/debian/changelog index 0eb0e436..53e69ebe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -prometheus-podman3-exporter (1.3.0-1) unstable; urgency=medium +prometheus-podman3-exporter (1.2.0-1~bpo+1) unstable; urgency=medium * Debianize the package * Remove unnecessary files diff --git a/debian/rules b/debian/rules index b9f9fdd2..d2465ea4 100755 --- a/debian/rules +++ b/debian/rules @@ -7,12 +7,13 @@ include /usr/share/dpkg/pkg-info.mk DH_GOPKG = github.com/yylyyl/prometheus-podman3-exporter BUILDDIR := $(CURDIR)/build +REVISION := $(shell echo '$(DEB_VERSION)' | sed -E 's/^([^-]+-)+//') BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null || echo unknown) BUILDTAGS := BUILDFLAGS = -tags "$(BUILDTAGS)" -ldflags \ " -X $(DH_GOPKG)/cmd.buildVersion=$(DEB_VERSION_UPSTREAM)\ - -X $(DH_GOPKG)/cmd.buildRevision=$(DEB_VERSION)\ + -X $(DH_GOPKG)/cmd.buildRevision=$(REVISION)\ -X $(DH_GOPKG)/cmd.buildBranch=$(BRANCH)" %: