Skip to content

Commit

Permalink
refactor(templates): Simplify target template file names with post_ge…
Browse files Browse the repository at this point in the history
…n_project.py hook
  • Loading branch information
vicmattos committed Nov 21, 2023
1 parent f087875 commit ceba9fb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cookiecutter/target-template/hooks/post_gen_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python
from pathlib import Path
import shutil


BASE_PATH = Path('{{cookiecutter.library_name}}')


if __name__ == '__main__':

if '{{ cookiecutter.license }}' != 'Apache-2.0':
Path('LICENSE').unlink()

if '{{ cookiecutter.include_ci_files }}' != 'GitHub':
shutil.rmtree(Path('.github'))

0 comments on commit ceba9fb

Please sign in to comment.