Commit dd0326a6 authored by Marcelo Henrique Cerri's avatar Marcelo Henrique Cerri Committed by Stefan Bader

UBUNTU: [Packaging] startnewrelease: Add support for backport versioning

Ignore: yes

Use the parent kernel version as base for the new release version if
the BACKPORT_SUFFIX variable is set in the update.conf file.
Signed-off-by: default avatarMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 2a61147d
......@@ -125,10 +125,20 @@ diffupstream:
startnewrelease:
dh_testdir
@ver=$$(echo "$(revision)" | perl -ne 'if (/^(\d*)\.(\d*)(.*)?$$/) { printf("%d.%d%s\n", $$1 + 1, $$2 +1, $$3) }'); \
@[ -f "$(DEBIAN)/etc/update.conf" ] && . "$(DEBIAN)/etc/update.conf"; \
if [ -n "$$BACKPORT_SUFFIX" ]; then \
ver="$$(dpkg-parsechangelog -l"$$DEBIAN_MASTER/changelog" -SVersion)~$${BACKPORT_SUFFIX}.1"; \
prev_ver="$$(dpkg-parsechangelog -l"$(DEBIAN)/changelog" -SVersion)"; \
if [ "$${ver%.*}" = "$${prev_ver%.*}" ]; then \
ver="$${ver%.*}.$$(( $${prev_ver##*.} +1 ))"; \
fi; \
else \
ver="$(release)-$$(echo "$(revision)" | \
perl -ne 'if (/^(\d*)\.(\d*)(.*)?$$/) { printf("%d.%d%s\n", $$1 + 1, $$2 +1, $$3) }')"; \
fi; \
now="$(shell date -R)"; \
echo "Creating new changelog set for $(release)-$$ver..."; \
echo -e "$(src_pkg_name) ($(release)-$$ver) UNRELEASED; urgency=medium\n" > $(DEBIAN)/changelog.new; \
echo "Creating new changelog set for $$ver..."; \
echo -e "$(src_pkg_name) ($$ver) UNRELEASED; urgency=medium\n" > $(DEBIAN)/changelog.new; \
echo " CHANGELOG: Do not edit directly. Autogenerated at release." >> \
$(DEBIAN)/changelog.new; \
echo " CHANGELOG: Use the printchanges target to see the curent changes." \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment