Merge branch 'main' into TIF/Runtime

This commit is contained in:
John
2021-06-15 17:32:21 +01:00
38 changed files with 645 additions and 287 deletions
+5
View File
@@ -65,6 +65,11 @@ def get_client(service_name, profile_name):
def get_files_to_upload(base_dir, regex):
# Get all file names in base directory
files = [x for x in os.listdir(base_dir) if os.path.isfile(os.path.join(base_dir, x))]
# strip the surround quotes, if they exist
try:
regex = json.loads(regex)
except:
pass
# Get all file names matching the regular expression, those file will be uploaded to S3
files_to_upload = [x for x in files if re.match(regex, x)]
return files_to_upload