]> git.proxmox.com Git - pmg-docs.git/commitdiff
make changelog single source of version
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Jul 2019 17:43:12 +0000 (19:43 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Jul 2019 17:43:15 +0000 (19:43 +0200)
Adapted from pve-docs respective commit [0]

[0]: https://git.proxmox.com/?p=pve-docs.git;a=commitdiff;h=76909adf48fc211e7799795fcb96eed5447e2b9a

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile
pmg-doc-generator.mk.in

index 9f102affba69c8820f7dcddb6cb73263daa701d3..8b125df1f87d7c0c8d4395064cd45da5aadf13e5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+include /usr/share/dpkg/pkg-info.mk
+
 DGDIR=.
 ASCIIDOC_PMG=./asciidoc-pmg
 
@@ -6,15 +8,15 @@ DOC_PACKAGE=pmg-docs
 WEB_PACKAGE=pmg-docs-apache
 
 # also update debian/changelog
-PKGREL=3
+PKGREL=1
 
 GITVERSION:=$(shell git rev-parse HEAD)
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
-GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${PKGREL}_${ARCH}.deb
-DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
-WEB_DEB=${WEB_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
+GEN_DEB=${GEN_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${ARCH}.deb
+DOC_DEB=${DOC_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+WEB_DEB=${WEB_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
 
 export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
 SOURCE_DATE_HUMAN := $(shell date -d "@${SOURCE_DATE_EPOCH}")
@@ -34,6 +36,7 @@ ADOC_SOURCES_GUESS=$(filter-out %-synopsis.adoc %-opts.adoc %-table.adoc, $(wild
 
 pmg-doc-generator.mk: .pmg-doc-depends pmg-doc-generator.mk.in
        cat pmg-doc-generator.mk.in .pmg-doc-depends > $@.tmp
+       sed -i "s/@RELEASE@$$/${DEB_VERSION_UPSTREAM}/" $@.tmp
        mv $@.tmp $@
 
 -include ./pmg-doc-generator.mk
index 591b9e2b2134bf0ca820106009f064f96ad46594..be0a3e8db61f78ab5aaf9f3b2944df2f3e15e21d 100644 (file)
@@ -1,5 +1,4 @@
-# also update debian/changelog
-DOCRELEASE=5.2
+DOCRELEASE=@RELEASE@
 
 DGDIR?=/usr/share/pmg-doc-generator