def download_bot_pack(): botpack_location = get_content_folder() / BOTPACK_FOLDER botpack_status = RepoDownloader().download(BOTPACK_REPO_OWNER, BOTPACK_REPO_NAME, botpack_location) additional_settings = {COMMIT_ID_KEY: get_last_botpack_commit_id()} update_gui_after_botpack_update(botpack_location, botpack_status, additional_settings)
def update_bot_pack(): botpack_location = get_content_folder() / BOTPACK_FOLDER botpack_status = BotpackUpdater().update(BOTPACK_REPO_OWNER, BOTPACK_REPO_NAME, botpack_location) if botpack_status == BotpackStatus.REQUIRES_FULL_DOWNLOAD: botpack_status = RepoDownloader().download(BOTPACK_REPO_OWNER, BOTPACK_REPO_NAME, botpack_location) additional_settings = {COMMIT_ID_KEY: get_last_botpack_commit_id()} update_gui_after_botpack_update(botpack_location, botpack_status, additional_settings)
def update_map_pack(): location = get_content_folder() / MAPPACK_FOLDER updater = MapPackUpdater(location, MAPPACK_REPO[0], MAPPACK_REPO[1]) map_index_old = updater.get_map_index() status = updater.needs_update() if status == BotpackStatus.REQUIRES_FULL_DOWNLOAD: status = RepoDownloader().download(MAPPACK_REPO[0], MAPPACK_REPO[1], location, update_tag_setting=False) map_index = updater.get_map_index() if map_index is None: print("ERROR: Updating mappack failed! There is no revision") return updater.hydrate_map_pack(map_index_old) update_gui_after_botpack_update(location, status)