mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 01:14:53 +03:00
Always keep Heroku post-compile hooks
This commit is contained in:
parent
7d39b56749
commit
d216bfbae1
|
@ -96,10 +96,6 @@ def remove_heroku_files():
|
||||||
# don't remove the file if we are using travisci but not using heroku
|
# don't remove the file if we are using travisci but not using heroku
|
||||||
continue
|
continue
|
||||||
os.remove(file_name)
|
os.remove(file_name)
|
||||||
remove_heroku_build_hooks()
|
|
||||||
|
|
||||||
|
|
||||||
def remove_heroku_build_hooks():
|
|
||||||
shutil.rmtree("bin")
|
shutil.rmtree("bin")
|
||||||
|
|
||||||
|
|
||||||
|
@ -442,8 +438,6 @@ def main():
|
||||||
|
|
||||||
if "{{ cookiecutter.use_heroku }}".lower() == "n":
|
if "{{ cookiecutter.use_heroku }}".lower() == "n":
|
||||||
remove_heroku_files()
|
remove_heroku_files()
|
||||||
elif "{{ cookiecutter.frontend_pipeline }}" != "Django Compressor":
|
|
||||||
remove_heroku_build_hooks()
|
|
||||||
|
|
||||||
if "{{ cookiecutter.use_docker }}".lower() == "n" and "{{ cookiecutter.use_heroku }}".lower() == "n":
|
if "{{ cookiecutter.use_docker }}".lower() == "n" and "{{ cookiecutter.use_heroku }}".lower() == "n":
|
||||||
if "{{ cookiecutter.keep_local_envs_in_vcs }}".lower() == "y":
|
if "{{ cookiecutter.keep_local_envs_in_vcs }}".lower() == "y":
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
{%- if "{{ cookiecutter.frontend_pipeline }}" != "Django Compressor" %}
|
||||||
compress_enabled() {
|
compress_enabled() {
|
||||||
python << END
|
python << END
|
||||||
import sys
|
import sys
|
||||||
|
@ -19,5 +20,6 @@ if compress_enabled
|
||||||
then
|
then
|
||||||
python manage.py compress
|
python manage.py compress
|
||||||
fi
|
fi
|
||||||
|
{%- endif %}
|
||||||
python manage.py collectstatic --noinput
|
python manage.py collectstatic --noinput
|
||||||
python manage.py compilemessages --noinput
|
python manage.py compilemessages --noinput
|
||||||
|
|
Loading…
Reference in New Issue
Block a user