allow file globs

This commit is contained in:
James Turk 2020-05-29 10:40:23 -04:00
parent 118c8d61ce
commit 35e9c628c1

View File

@ -58,8 +58,10 @@ def create_psycopg2_layer():
def do_publish(function): def do_publish(function):
zipfilename = "upload.zip" zipfilename = "upload.zip"
with zipfile.ZipFile(zipfilename, "w") as zf: with zipfile.ZipFile(zipfilename, "w") as zf:
for fn in function.files: for fileglob in function.files:
zf.write(fn) for fn in glob.glob(fileglob):
zf.write(fn)
click.echo(f"adding {fn}")
client = boto3.client("lambda") client = boto3.client("lambda")