We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
post_gen_project.py
1 parent f087875 commit 669553eCopy full SHA for 669553e
cookiecutter/target-template/hooks/post_gen_project.py
@@ -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"))
cookiecutter/target-template/{{cookiecutter.target_id}}/.github/{% if cookiecutter.include_ci_files == 'GitHub' %}dependabot.yml{%endif%} renamed to cookiecutter/target-template/{{cookiecutter.target_id}}/.github/dependabot.yml
cookiecutter/target-template/{{cookiecutter.target_id}}/.github/workflows/{% if cookiecutter.include_ci_files == 'GitHub' %}test.yml{%endif%} renamed to cookiecutter/target-template/{{cookiecutter.target_id}}/.github/workflows/test.yml
cookiecutter/target-template/{{cookiecutter.target_id}}/{%if 'Apache-2.0' == cookiecutter.license %}LICENSE{%endif%} renamed to cookiecutter/target-template/{{cookiecutter.target_id}}/LICENSE
0 commit comments