diff --git a/abstra_cli/deploy.py b/abstra_cli/deploy.py index bdbaf58..c225e94 100644 --- a/abstra_cli/deploy.py +++ b/abstra_cli/deploy.py @@ -71,7 +71,7 @@ def deploy(**kwargs): for job in jobs: Jobs.add(upsert=True, **job) - files = deploy_data.pop("files", None) + files = deploy_data.pop("files", ["."]) # review security implications if files: if isinstance(files, dict): Files.add(**files) diff --git a/abstra_cli/utils/file.py b/abstra_cli/utils/file.py index 89c1863..374593d 100644 --- a/abstra_cli/utils/file.py +++ b/abstra_cli/utils/file.py @@ -14,9 +14,14 @@ def get_ignore_files(dir): IGNOREFILE = os.path.join(dir, ABSTRA_IGNORE) abstra_path = os.path.join(dir, ABSTRA_FOLDER) ignored = [IGNOREFILE, abstra_path] + + GITIGNORE = os.path.join(dir, ".gitignore") if os.path.exists(IGNOREFILE): with open(IGNOREFILE, "r") as f: ignored.extend([os.path.join(dir, f) for f in f.read().split("\n") if f]) + elif os.path.exists(GITIGNORE): + with open(GITIGNORE, "r") as f: + ignored.extend([os.path.join(dir, f) for f in f.read().split("\n") if f]) return ignored