contrib/packaging/hgpackaging/inno.py
changeset 43566 7c9f63a5cb14
parent 43565 24633444ff32
child 44150 f37971c31067
--- a/contrib/packaging/hgpackaging/inno.py	Thu Oct 24 21:22:08 2019 -0700
+++ b/contrib/packaging/hgpackaging/inno.py	Tue Oct 22 18:34:03 2019 -0700
@@ -18,7 +18,10 @@
     build_py2exe,
     stage_install,
 )
-from .util import find_vc_runtime_files
+from .util import (
+    find_vc_runtime_files,
+    read_version_py,
+)
 
 EXTRA_PACKAGES = {
     'dulwich',
@@ -149,8 +152,10 @@
     if vc_x64:
         args.append('/dARCH=x64')
 
-    if version:
-        args.append('/dVERSION=%s' % version)
+    if not version:
+        version = read_version_py(source_dir)
+
+    args.append('/dVERSION=%s' % version)
 
     args.append('/Odist')
     args.append(str(inno_build_dir / 'mercurial.iss'))