From 35e9c628c1ed54025fbd2b1351829148090b25dc Mon Sep 17 00:00:00 2001 From: James Turk Date: Fri, 29 May 2020 10:40:23 -0400 Subject: [PATCH] allow file globs --- tripod_lambda.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tripod_lambda.py b/tripod_lambda.py index 25a2e4c..5867da5 100755 --- a/tripod_lambda.py +++ b/tripod_lambda.py @@ -58,8 +58,10 @@ def create_psycopg2_layer(): def do_publish(function): zipfilename = "upload.zip" with zipfile.ZipFile(zipfilename, "w") as zf: - for fn in function.files: - zf.write(fn) + for fileglob in function.files: + for fn in glob.glob(fileglob): + zf.write(fn) + click.echo(f"adding {fn}") client = boto3.client("lambda")