From cae638d7aae0f7ef64b6d31b06e5c4368baabf16 Mon Sep 17 00:00:00 2001 From: "Mike A. Trethewey" Date: Wed, 26 Feb 2020 03:45:48 -0800 Subject: [PATCH] Do stuff if we've got filenames but only do it once --- resources/ci/common/prepare_release.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/resources/ci/common/prepare_release.py b/resources/ci/common/prepare_release.py index 86f229bd..98348da7 100644 --- a/resources/ci/common/prepare_release.py +++ b/resources/ci/common/prepare_release.py @@ -52,14 +52,15 @@ BUILD_FILENAMES = BUILD_FILENAME print(BUILD_FILENAMES) -for BUILD_FILENAME in BUILD_FILENAMES: - if not BUILD_FILENAME == "": - if not "artifact" in BUILD_FILENAME: - # move the binary to temp folder - move( - os.path.join(".",BUILD_FILENAME), - os.path.join("..","artifact",BUILD_FILENAME) - ) +if len(BUILD_FILENAMES) > 0: + for BUILD_FILENAME in BUILD_FILENAMES: + if not BUILD_FILENAME == "": + if not "artifact" in BUILD_FILENAME: + # move the binary to temp folder + move( + os.path.join(".",BUILD_FILENAME), + os.path.join("..","artifact",BUILD_FILENAME) + ) # clean the git slate git_clean()