From d85e96803b8a6e2ee15ae75df7ee51c89942ea71 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Thu, 31 Jan 2019 22:04:19 +0100 Subject: [pkg] increment debian changelog from git version --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index de677c5..09eaf84 100755 --- a/Makefile +++ b/Makefile @@ -107,16 +107,19 @@ build_snap: mkdir -p dist mv $(APPNAME)* dist/ -DEB_VER = $(shell dpkg-parsechangelog -SVersion | cut -d '-' -f 1) build_deb: tgz echo "[+] building deb..." + @if [ $(BUILD_RELEASE) = no ]; then\ + echo "[!] BUILD_RELEASE=no, incrementing changelog";\ + dch -v $(VERSION) -M "debian package generated from the git repository";\ + fi mkdir -p build - mkdir -p dist - cp dist/$(APPNAME)-$(VERSION).tgz build/$(APPNAME)_$(DEB_VER).orig.tar.gz - cd build && tar xzf $(APPNAME)_$(DEB_VER).orig.tar.gz + cp dist/$(APPNAME)-$(VERSION).tgz build/$(APPNAME)_$(shell dpkg-parsechangelog -SVersion | cut -d '-' -f 1-2).orig.tar.gz + cd build && tar xzf $(APPNAME)_$(shell dpkg-parsechangelog -SVersion | cut -d '-' -f 1-2).orig.tar.gz cp -r debian/ build/$(APPNAME)-$(VERSION)/ cd build/$(APPNAME)-$(VERSION) && debuild -us -uc cp build/$(APPNAME)_$(shell dpkg-parsechangelog -SVersion)_*.deb dist/ + git checkout -- debian/changelog # ----------------------------------------------------------------------------- # Utils -- cgit v1.2.3