From 8dea8c690fd5e5a7deefcf151484be2b70d3d16c Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 7 Oct 2020 14:55:56 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20distribute=20version=20number=20fro?= =?UTF-8?q?m=20config.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 1 + helper.py | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/config.py b/config.py index ea55f9b4..0375c1fe 100644 --- a/config.py +++ b/config.py @@ -27,6 +27,7 @@ for directory in os.listdir(bitmaps_dir): with open("./package.json") as f: data = json.loads(f.read()) author = data["author"] + version = data["version"] # Windows Cursors Config windows_cursors = { diff --git a/helper.py b/helper.py index dc822a66..f15ce4ed 100644 --- a/helper.py +++ b/helper.py @@ -5,7 +5,7 @@ import json import sys from os import path, listdir, rename, remove -from config import name, bitmaps_dir, out_dir, window_install_inf_content, windows_cursors +from config import name, version, bitmaps_dir, out_dir, window_install_inf_content, windows_cursors def window_bundle(win_out_dir: str) -> None: @@ -31,10 +31,7 @@ def init_build() -> None: Print build version. Remove previously built packages && Check Bitmaps. """ - with open("./package.json", "r") as package_file: - data = json.loads(package_file.read()) - version = data['version'] - print("⚡ Bibata Builder Version %s" % version) + print("⚡ Bibata Builder Version %s" % version) # cleanup old packages if path.exists(out_dir):