mirror of
https://github.com/mvt-project/mvt.git
synced 2024-06-26 14:28:54 +00:00
Adds generation of reference info.json hash
This commit is contained in:
parent
f6814add71
commit
08277bfa87
|
@ -13,7 +13,7 @@ from typing import Callable, Optional
|
|||
|
||||
from mvt.common.indicators import Indicators
|
||||
from mvt.common.module import run_module, save_timeline
|
||||
from mvt.common.utils import convert_datetime_to_iso, generate_hashes_from_path
|
||||
from mvt.common.utils import convert_datetime_to_iso, generate_hashes_from_path, get_sha256_from_file_path
|
||||
from mvt.common.version import MVT_VERSION
|
||||
|
||||
|
||||
|
@ -119,6 +119,10 @@ class Command:
|
|||
with open(info_path, "w+", encoding="utf-8") as handle:
|
||||
json.dump(info, handle, indent=4)
|
||||
|
||||
if self.target_path and (os.environ.get("MVT_HASH_FILES") or self.hashes):
|
||||
info_hash = get_sha256_from_file_path(info_path)
|
||||
self.log.warning("Reference hash of the info.json file : %s", info_hash)
|
||||
|
||||
def generate_hashes(self) -> None:
|
||||
"""
|
||||
Compute hashes for files in the target_path
|
||||
|
|
Loading…
Reference in New Issue
Block a user