Opt for .travis.yml

Closes #1542.
This commit is contained in:
Nikita P. Shupeyko 2018-03-04 15:11:54 +03:00
parent afd3191038
commit 0a69f19452
2 changed files with 9 additions and 1 deletions

View File

@ -36,5 +36,6 @@
"use_sentry_for_error_reporting": "n", "use_sentry_for_error_reporting": "n",
"use_opbeat": "n", "use_opbeat": "n",
"use_whitenoise": "n", "use_whitenoise": "n",
"use_heroku": "n" "use_heroku": "n",
"use_travisci": "n"
} }

View File

@ -105,6 +105,10 @@ def remove_celery_app():
shutil.rmtree(os.path.join(PROJECT_DIR_PATH, '{{ cookiecutter.project_slug }}', 'taskapp')) shutil.rmtree(os.path.join(PROJECT_DIR_PATH, '{{ cookiecutter.project_slug }}', 'taskapp'))
def remove_dottravisyml_file():
os.remove(os.path.join(PROJECT_DIR_PATH, '.travis.yml'))
def append_to_project_gitignore(path): def append_to_project_gitignore(path):
gitignore_file_path = os.path.join(PROJECT_DIR_PATH, '.gitignore') gitignore_file_path = os.path.join(PROJECT_DIR_PATH, '.gitignore')
with open(gitignore_file_path, 'a') as gitignore_file: with open(gitignore_file_path, 'a') as gitignore_file:
@ -269,6 +273,9 @@ def main():
if '{{ cookiecutter.use_celery }}'.lower() == 'n': if '{{ cookiecutter.use_celery }}'.lower() == 'n':
remove_celery_app() remove_celery_app()
if '{{ cookiecutter.use_travisci }}'.lower() == 'n':
remove_dottravisyml_file()
if __name__ == '__main__': if __name__ == '__main__':
main() main()