From 706c324e6aa9c3eecdf611ea1663c469ba41cc9b Mon Sep 17 00:00:00 2001 From: Shupeyko Nikita Date: Mon, 24 Apr 2017 23:56:27 +0300 Subject: [PATCH] Remove files conventional to opensource projects only (#1137) --- hooks/post_gen_project.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index ba54a5a44..5e1eff9bd 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -201,6 +201,16 @@ def remove_elasticbeanstalk(): PROJECT_DIRECTORY, filename )) +def remove_open_source_files(): + """ + Removes files conventional to opensource projects only. + """ + for filename in ["CONTRIBUTORS.txt"]: + os.remove(os.path.join( + PROJECT_DIRECTORY, filename + )) + + # IN PROGRESS # def copy_doc_files(project_directory): # cookiecutters_dir = DEFAULT_CONFIG['cookiecutters_dir'] @@ -283,3 +293,7 @@ if '{{ cookiecutter.open_source_license}}' != 'GPLv3': # 12. Remove Elastic Beanstalk files if '{{ cookiecutter.use_elasticbeanstalk_experimental }}'.lower() != 'y': remove_elasticbeanstalk() + +# 13. Remove files conventional to opensource projects only. +if '{{ cookiecutter.open_source_license }}' == 'Not open source': + remove_open_source_files() \ No newline at end of file