mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-21 17:16:51 +03:00
Simplify post hook
This commit is contained in:
parent
4a1cdb5d25
commit
281dde1d1d
|
@ -72,22 +72,12 @@ def remove_heroku_files():
|
|||
file_names = [
|
||||
'Procfile',
|
||||
'runtime.txt',
|
||||
'requirements.txt',
|
||||
]
|
||||
for file_name in file_names:
|
||||
remove_file(os.path.join(PROJECT_DIR_PATH, file_name))
|
||||
|
||||
|
||||
def remove_paas_files():
|
||||
none_paas_files_left = True
|
||||
|
||||
if '{{ cookiecutter.use_heroku }}'.lower() == 'n':
|
||||
remove_heroku_files()
|
||||
none_paas_files_left &= True
|
||||
else:
|
||||
none_paas_files_left &= False
|
||||
|
||||
if none_paas_files_left:
|
||||
remove_file(os.path.join(PROJECT_DIR_PATH, 'requirements.txt'))
|
||||
|
||||
|
||||
def remove_grunt_files():
|
||||
|
@ -250,7 +240,8 @@ def main():
|
|||
if '{{ cookiecutter.use_docker }}'.lower() == 'n':
|
||||
remove_docker_files()
|
||||
|
||||
remove_paas_files()
|
||||
if '{{ cookiecutter.use_heroku }}'.lower() == 'n':
|
||||
remove_heroku_files()
|
||||
|
||||
if '{{ cookiecutter.js_task_runner}}'.lower() == 'gulp':
|
||||
remove_grunt_files()
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# This file is here because many Platforms as a Service look for
|
||||
# requirements.txt in the root directory of a project.
|
||||
# This file is expected by Heroku.
|
||||
|
||||
-r requirements/production.txt
|
||||
|
|
Loading…
Reference in New Issue
Block a user