Skip to content

Commit 669553e

Browse files
refactor(templates): Simplify target template file names with post_gen_project.py hook (#2061)
* refactor(templates): Simplify target template file names with post_gen_project.py hook * Update cookiecutter/target-template/hooks/post_gen_project.py --------- Co-authored-by: Edgar Ramírez Mondragón <[email protected]>
1 parent f087875 commit 669553e

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env python
2+
from pathlib import Path
3+
import shutil
4+
5+
6+
BASE_PATH = Path("{{cookiecutter.library_name}}")
7+
8+
9+
if __name__ == "__main__":
10+
if "{{ cookiecutter.license }}" != "Apache-2.0":
11+
Path("LICENSE").unlink()
12+
13+
if "{{ cookiecutter.include_ci_files }}" != "GitHub":
14+
shutil.rmtree(Path(".github"))

0 commit comments

Comments
 (0)