diff --git a/openbis_all/source/python/upload-sprint-to-confluence.py b/openbis_all/source/python/upload-sprint-to-confluence.py index fb1bf70385ad66039db68732204297c3f85faa8e..aa661b4e400d2dde2e23a29d83019b3f4911be25 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: