Inject the app version during the build
This commit is contained in:
parent
cd43e2e9b9
commit
c293d485d9
11
debian/rules
vendored
11
debian/rules
vendored
@ -1,4 +1,13 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh ${@} --with python2
|
dh ${@} --with-python2
|
||||||
|
|
||||||
|
# Inject version number in the code
|
||||||
|
override_dh_installdeb:
|
||||||
|
dh_installdeb
|
||||||
|
for pkg in $$(dh_listpackages -i); do \
|
||||||
|
find debian/$$pkg -type f -exec sed -i -e s/__DEB_VERSION__/$(DEB_VERSION)/g {} +; \
|
||||||
|
done
|
||||||
|
@ -672,10 +672,7 @@ class MenuWin(object):
|
|||||||
def showAboutDialog(self, action, userdata = None):
|
def showAboutDialog(self, action, userdata = None):
|
||||||
about = Gtk.AboutDialog()
|
about = Gtk.AboutDialog()
|
||||||
about.set_name("mintMenu")
|
about.set_name("mintMenu")
|
||||||
import subprocess
|
about.set_version("__DEB_VERSION__")
|
||||||
(stdout, stderr) = subprocess.Popen(["/usr/lib/python3/dist-packages/mintcommon/version.py", "mintmenu"],
|
|
||||||
stdout=subprocess.PIPE).communicate()
|
|
||||||
about.set_version(stdout.strip())
|
|
||||||
try:
|
try:
|
||||||
gpl = open('/usr/share/common-licenses/GPL','r').read()
|
gpl = open('/usr/share/common-licenses/GPL','r').read()
|
||||||
about.set_license(gpl)
|
about.set_license(gpl)
|
||||||
|
Loading…
Reference in New Issue
Block a user