Use updates json from other branch

This commit is contained in:
Nikhil Badyal
2024-04-18 09:42:54 +05:30
committed by Nikhil Badyal
parent cf8dd0fb59
commit 24f170552f
4 changed files with 34 additions and 17 deletions
+5 -3
View File
@@ -11,7 +11,7 @@ from src.downloader.download import Downloader
from src.exceptions import AppNotFoundError, BuilderError, PatchesJsonLoadError, PatchingFailedError
from src.parser import Parser
from src.patches import Patches
from src.utils import check_java, delete_old_changelog, save_patch_info, write_changelog_to_file
from src.utils import check_java, delete_old_changelog, load_older_updates, save_patch_info, write_changelog_to_file
def get_app(config: RevancedConfig, app_name: str) -> APP:
@@ -26,10 +26,12 @@ def main() -> None:
env = Env()
env.read_env()
config = RevancedConfig(env)
updates_info = {}
Downloader.extra_downloads(config)
if not config.dry_run:
check_java()
delete_old_changelog()
updates_info = load_older_updates(env)
logger.info(f"Will Patch only {config.apps}")
for possible_app in config.apps:
@@ -43,7 +45,7 @@ def main() -> None:
app.download_apk_for_patching(config)
parser.include_exclude_patch(app, app_all_patches, patcher.patches_dict)
logger.info(app)
save_patch_info(app)
updates_info = save_patch_info(app, updates_info)
parser.patch_app(app)
except AppNotFoundError as e:
logger.info(e)
@@ -53,7 +55,7 @@ def main() -> None:
logger.exception(e)
except BuilderError as e:
logger.exception(f"Failed to build {possible_app} because of {e}")
write_changelog_to_file()
write_changelog_to_file(updates_info)
if __name__ == "__main__":