From 0a69f194520b34070ef7a807d4041f42c4d08d50 Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Sun, 4 Mar 2018 15:11:54 +0300 Subject: [PATCH] Opt for .travis.yml Closes #1542. --- cookiecutter.json | 3 ++- hooks/post_gen_project.py | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cookiecutter.json b/cookiecutter.json index d3278194..00b9372d 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -36,5 +36,6 @@ "use_sentry_for_error_reporting": "n", "use_opbeat": "n", "use_whitenoise": "n", - "use_heroku": "n" + "use_heroku": "n", + "use_travisci": "n" } diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 9d0c30a0..83e41eb8 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -105,6 +105,10 @@ def remove_celery_app(): 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): gitignore_file_path = os.path.join(PROJECT_DIR_PATH, '.gitignore') with open(gitignore_file_path, 'a') as gitignore_file: @@ -269,6 +273,9 @@ def main(): if '{{ cookiecutter.use_celery }}'.lower() == 'n': remove_celery_app() + if '{{ cookiecutter.use_travisci }}'.lower() == 'n': + remove_dottravisyml_file() + if __name__ == '__main__': main()