@@ -33,22 +33,6 @@ def replace_contents(filename, what, replacement):
3333 shutil .rmtree ('docs' )
3434{% endif % }
3535
36- {% if cookiecutter .test_matrix_configurator == "yes" % }
37- print ("""
38- ################################################################################
39-
40- For your convenience, the test environments are getting configured for the
41- first time, as you have selected "yes" for `test_matrix_configurator` ...
42- """ )
43- try :
44- subprocess .check_call (['tox' ])
45- except Exception :
46- try :
47- subprocess .check_call ([sys .executable , '-mtox' ])
48- except Exception :
49- subprocess .check_call ([sys .executable , join ('ci' , 'bootstrap.py' )])
50- {% endif % }
51-
5236{% - if cookiecutter .command_line_interface == 'no' % }
5337 os .unlink (join ('src' , '{{ cookiecutter.package_name }}' , '__main__.py' ))
5438 os .unlink (join ('src' , '{{ cookiecutter.package_name }}' , 'cli.py' ))
@@ -80,19 +64,32 @@ def replace_contents(filename, what, replacement):
8064 os .unlink (join ('ci' , 'appveyor-bootstrap.py' ))
8165 os .unlink (join ('ci' , 'appveyor-download.py' ))
8266 os .unlink (join ('ci' , 'appveyor-with-compiler.cmd' ))
83- os .unlink (' appveyor.yml' )
84- if os .path .exists (join ( 'ci' , 'templates' , ' appveyor.yml') ):
85- os .unlink (join ( 'ci' , 'templates' , ' appveyor.yml') )
67+ os .unlink (join ( 'ci' , 'templates' , ' appveyor.yml') )
68+ if os .path .exists (' appveyor.yml' ):
69+ os .unlink (' appveyor.yml' )
8670{% endif % }
8771
8872{% - if cookiecutter .travis == 'no' % }
89- os .unlink (' .travis.yml' )
90- if os .path .exists (join ( 'ci' , 'templates' , ' .travis.yml') ):
91- os .unlink (join ( 'ci' , 'templates' , ' .travis.yml') )
73+ os .unlink (join ( 'ci' , 'templates' , ' .travis.yml') )
74+ if os .path .exists (' .travis.yml' ):
75+ os .unlink (' .travis.yml' )
9276{% endif % }
9377
9478 print ("""
9579################################################################################
80+
81+ Generating CI configuration ...
82+ """ )
83+ try :
84+ subprocess .check_call (['tox' , '-e' , 'bootstrap' ])
85+ except Exception :
86+ try :
87+ subprocess .check_call ([sys .executable , '-mtox' , '-e' , 'bootstrap' ])
88+ except Exception :
89+ subprocess .check_call ([sys .executable , join ('ci' , 'bootstrap.py' )])
90+
91+ print ("""
92+ ################################################################################
9693################################################################################
9794
9895 You have succesfully created `{{ cookiecutter.repo_name }}`.
@@ -104,6 +101,8 @@ def replace_contents(filename, what, replacement):
104101 {{ "{0:26}".format(key + ":") }} {{ "{0!r}".format(value).strip("u") }}
105102{%- endfor %}
106103
104+ See .cookiecutterrc for instructions on regenerating the project.
105+
107106################################################################################
108107
109108 To get started run these:
@@ -116,17 +115,16 @@ def replace_contents(filename, what, replacement):
116115 git push -u origin master
117116
118117{% if cookiecutter.test_matrix_configurator == "yes" %}
119- To reconfigure your test/CI settings run:
118+ To regenerate your tox.ini, .travis.yml or appveyor.yml run:
119+ {% else %}
120+ To regenerate your .travis.yml or appveyor.yml run:
121+ {% endif %}
120122
121123 tox -e bootstrap
122124
123125 You can also run:
124126
125127 ./ci/bootstrap.py
126- {% else %}
127- The project doesn't use the test matrix configurator, but in case
128- you change your mind just edit `setup.cfg` and run `ci/bootstrap.py`.
129- {% endif %}
130128""" )
131129
132130 command_line_interface_bin_name = '{{ cookiecutter.command_line_interface_bin_name }}'
0 commit comments