From 5a4a3217f19c7ac3414a26dc5dab68897c63645e Mon Sep 17 00:00:00 2001 From: Cole Mackenzie Date: Tue, 16 Oct 2018 13:22:04 -0600 Subject: [PATCH] prevent removal if using travisci --- hooks/post_gen_project.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index af2523e7..45435dd0 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -69,8 +69,11 @@ def remove_utility_files(): def remove_heroku_files(): - file_names = ["Procfile", "runtime.txt"] + file_names = ["Procfile", "runtime.txt", "requirements.txt"] for file_name in file_names: + if file_name == "requirements.txt" and "{{ cookiecutter.use_travisci }}".lower() == "y": + # don't remove the file if we are using travisci but not using heroku + continue os.remove(file_name)