From 9e8e09119d5e7065fd2435b5bfe64fdfd0126816 Mon Sep 17 00:00:00 2001 From: Cole Mackenzie Date: Wed, 10 Oct 2018 21:35:17 -0600 Subject: [PATCH 1/3] Remove requirements.txt file from delete list. fixes #1829 --- hooks/post_gen_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index b43b08a5..af2523e7 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -69,7 +69,7 @@ def remove_utility_files(): def remove_heroku_files(): - file_names = ["Procfile", "runtime.txt", "requirements.txt"] + file_names = ["Procfile", "runtime.txt"] for file_name in file_names: os.remove(file_name) From 00177b838f264e51ff2c5b2fc7f71e5ea7153549 Mon Sep 17 00:00:00 2001 From: Cole Mackenzie Date: Wed, 10 Oct 2018 21:42:23 -0600 Subject: [PATCH 2/3] Update CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index c17c951e..d6c0d936 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -78,6 +78,7 @@ Listed in alphabetical order. Chris Franklin `@hairychris`_ Chris Pappalardo `@ChrisPappalardo`_ Christopher Clarke `@chrisdev`_ + Cole Mackenzie `@cmackenzie1`_ Collederas `@Collederas`_ Cristian Vargas `@cdvv7788`_ Cullen Rhodes `@c-rhodes`_ @@ -198,6 +199,7 @@ Listed in alphabetical order. .. _@chrisdev: https://github.com/chrisdev .. _@ChrisPappalardo: https://github.com/ChrisPappalardo .. _@chuckus: https://github.com/chuckus +.. _@cmackenzie1: https://github.com/cmackenzie1 .. _@Collederas: https://github.com/Collederas .. _@ddiazpinto: https://github.com/ddiazpinto .. _@dezoito: https://github.com/dezoito From 5a4a3217f19c7ac3414a26dc5dab68897c63645e Mon Sep 17 00:00:00 2001 From: Cole Mackenzie Date: Tue, 16 Oct 2018 13:22:04 -0600 Subject: [PATCH 3/3] 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)