From deb79eff7e3e9087621bda5ba8630f7aa3a0d506 Mon Sep 17 00:00:00 2001 From: Michael Baentsch <57787676+baentsch@users.noreply.github.com> Date: Thu, 26 Oct 2023 19:45:02 +0200 Subject: [PATCH] move cleanup code to the end --- scripts/copy_from_upstream/copy_from_upstream.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/copy_from_upstream/copy_from_upstream.py b/scripts/copy_from_upstream/copy_from_upstream.py index 665328f032..92264fb1bb 100755 --- a/scripts/copy_from_upstream/copy_from_upstream.py +++ b/scripts/copy_from_upstream/copy_from_upstream.py @@ -612,10 +612,6 @@ def copy_from_upstream(): with open(os.path.join(os.environ['LIBOQS_DIR'], 'tests', 'KATs', t, 'kats.json'), "w") as f: json.dump(kats[t], f, indent=2, sort_keys=True) -# TBD: What's the purpose of this rmtree? It destroys patches to the documentation -# if not keepdata: -# shutil.rmtree('repos') - update_upstream_alg_docs.do_it(os.environ['LIBOQS_DIR']) sys.path.insert(1, os.path.join(os.environ['LIBOQS_DIR'], 'scripts')) @@ -624,6 +620,10 @@ def copy_from_upstream(): update_docs_from_yaml.do_it(os.environ['LIBOQS_DIR']) update_cbom.update_cbom_if_algs_not_changed(os.environ['LIBOQS_DIR'], "git") + if not keepdata: + shutil.rmtree('repos') + + def verify_from_upstream(): instructions = load_instructions() basedir = "verify_from_upstream"