From c7061c6def2254006c3fae6e168b74656067f00d Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Fri, 24 May 2013 11:03:33 +0000 Subject: [PATCH] Fixed script to upload the latest version found instead of the first one, when there is more than one version for the same sprint. SVN: 29209 --- openbis_all/source/python/upload-sprint-to-confluence.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openbis_all/source/python/upload-sprint-to-confluence.py b/openbis_all/source/python/upload-sprint-to-confluence.py index fb1bf70385a..aa661b4e400 100755 --- a/openbis_all/source/python/upload-sprint-to-confluence.py +++ b/openbis_all/source/python/upload-sprint-to-confluence.py @@ -117,11 +117,13 @@ def createMetabolomicsDssDist(version): # return to the original dir os.chdir(current_dir) - +# When looking for a file this method returns the last founded, this way if there is more than one version it returns the latest. def findFile(filePattern): + foundFile = None for file in os.listdir(DOWNLOAD_FOLDER): if file.startswith(filePattern): - return file + foundFile = file + return foundFile if __name__ == '__main__': if len(sys.argv) < 2: -- GitLab