mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-08 18:32:21 +00:00
Add update of the git commit hash in gtff default during build
This commit is contained in:
4
build/pyinstaller/GTFF_DEFAULTS.json
vendored
4
build/pyinstaller/GTFF_DEFAULTS.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"GTFF_PACKAGED_APPLICATION": "True",
|
||||
"GT_LOGGING_COMMIT_HASH": "938e9be",
|
||||
"GT_LOGGING_COMMIT_HASH": "sha:15bde4e2",
|
||||
"GTFF_ENABLE_PREDICT": "False",
|
||||
"GTFF_ENABLE_CHECK_API": "True",
|
||||
"GTFF_ENABLE_THOUGHTS_DAY": "False",
|
||||
@@ -27,4 +27,4 @@
|
||||
"GTFF_OPEN_REPORT_AS_HTML": "True",
|
||||
"GTFF_ENABLE_QUICK_EXIT": "False",
|
||||
"GTFF_ENABLE_EXIT_AUTO_HELP": "False"
|
||||
}
|
||||
}
|
||||
14
build/pyinstaller/terminal.spec
vendored
14
build/pyinstaller/terminal.spec
vendored
@@ -1,12 +1,15 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
|
||||
from PyInstaller.compat import is_darwin, is_win
|
||||
from PyInstaller.building.api import PYZ, EXE, COLLECT
|
||||
from PyInstaller.building.splash import Splash
|
||||
from PyInstaller.building.build_main import Analysis
|
||||
|
||||
from gamestonk_terminal.loggers import get_commit_hash
|
||||
|
||||
NAME = "GamestonkTerminal"
|
||||
|
||||
build_type = (
|
||||
@@ -18,6 +21,17 @@ pathex = os.path.join(
|
||||
os.path.dirname(sys.executable), "..", "lib", "python3.8", "site-packages"
|
||||
)
|
||||
|
||||
# Get latest commit
|
||||
commit_hash = get_commit_hash()
|
||||
build_assets_folder = os.path.join(os.getcwd(), "build", "pyinstaller")
|
||||
default_feature_flags_path = os.path.join(build_assets_folder, "GTFF_DEFAULTS.json")
|
||||
with open(default_feature_flags_path, "r") as f:
|
||||
default_gtff = json.load(f)
|
||||
|
||||
default_gtff["GT_LOGGING_COMMIT_HASH"] = commit_hash
|
||||
with open(default_feature_flags_path, "w") as f:
|
||||
json.dump(default_gtff, f, indent=4)
|
||||
|
||||
# Files that are explicitly pulled into the bundle
|
||||
added_files = [
|
||||
(os.path.join(os.getcwd(), "gamestonk_terminal"), "gamestonk_terminal"),
|
||||
|
||||
Reference in New Issue
Block a user