From 37aad51438dfe752eb1e913ee9bbee6017e9e62b Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Thu, 7 Sep 2023 12:38:52 +0300 Subject: [PATCH] [Build] Regenerate verification-metadata.xml in bootstrap-update script This is needed for two purposes: - sometimes dependencies may differ because of changes in KGP, and it's better to find it right after version-update commit, not only at remote run - there is a plan to drop `trusted` section from `verification-metadata.xml` and always set specific versions of used dependencies even for bootstrap dependencies, so running it in regular bootstrap update routine won't allow forgetting about it (see KTI-1374) --- scripts/update-bootstrap | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/update-bootstrap b/scripts/update-bootstrap index da328d26954..466c82447b4 100755 --- a/scripts/update-bootstrap +++ b/scripts/update-bootstrap @@ -13,11 +13,26 @@ def update_content(file_name, prefix, replacement): with open(file_name, 'w', encoding='utf-8') as file: file.writelines(data) +def git_add(*files): + subprocess.run(['git', 'add', *files], check=True) + +def git_commit(message): + subprocess.run(['git', 'commit', message]) + + if __name__ == '__main__': version = sys.argv[1] properties = 'gradle.properties' kotlinc = '.idea/kotlinc.xml' update_content(properties, 'bootstrap.kotlin.default.version', f'bootstrap.kotlin.default.version={version}\n') update_content(kotlinc, '