From d975cbc4ff02981b509097f7dd3130859d0ea737 Mon Sep 17 00:00:00 2001 From: Marwan Abbas Date: Tue, 2 Jul 2024 11:54:43 +0100 Subject: [PATCH] added gitignore to ip dir --- ipm/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ipm/common.py b/ipm/common.py index 1db36cf..21b857c 100644 --- a/ipm/common.py +++ b/ipm/common.py @@ -185,6 +185,11 @@ class IPRoot: def __post_init__(self): pathlib.Path(self.path).mkdir(parents=True, exist_ok=True) + gitignore_path = os.path.join(self.path, '.gitignore') + with open(gitignore_path, 'w') as gitignore_file: + gitignore_file.write('*\n') + gitignore_file.write('!dependencies.json\n') + gitignore_file.write('!.gitignore\n') @property def dependencies_path(self) -> str: