mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Fix finding version when building Windows installer
This commit is contained in:
parent
ef4878a4ad
commit
ebd3a841dc
1 changed files with 4 additions and 7 deletions
|
@ -107,14 +107,11 @@ def build_components_xml(root, data):
|
||||||
def main():
|
def main():
|
||||||
version_filename = os.path.join(
|
version_filename = os.path.join(
|
||||||
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
|
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
|
||||||
"dangerzone",
|
"share",
|
||||||
"__init__.py",
|
"version.txt",
|
||||||
)
|
)
|
||||||
with open(version_filename) as f:
|
with open(version_filename) as f:
|
||||||
for line in f.readlines():
|
version = f.read().strip()
|
||||||
if line.startswith("dangerzone_version ="):
|
|
||||||
version = line.split('"')[1]
|
|
||||||
break
|
|
||||||
|
|
||||||
dist_dir = os.path.join(
|
dist_dir = os.path.join(
|
||||||
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
|
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
|
||||||
|
@ -255,4 +252,4 @@ def main():
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in a new issue