File tree Expand file tree Collapse file tree 2 files changed +29
-3
lines changed
Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ def _get_line_break_position(text: str) -> int:
205205
206206def _version_to_regex (version : str ):
207207 clean_regex = version .replace ("." , r"\." ).replace ("+" , r"\+" )
208- return re .compile (f"\\ b { clean_regex } \\ b " )
208+ return re .compile (f"{ clean_regex } " )
209209
210210
211211def create_tag (version : Union [Version , str ], tag_format : Optional [str ] = None ):
Original file line number Diff line number Diff line change 5050version = "1.2.3"
5151"""
5252
53+ DOCKER_COMPOSE = """
54+ version: "3.3"
55+
56+ services:
57+ app:
58+ image: my-repo/my-container:v1.2.3
59+ command: my-command
60+ """
61+
5362MULTIPLE_VERSIONS_INCREASE_STRING = 'version = "1.2.9"\n ' * 30
5463MULTIPLE_VERSIONS_REDUCE_STRING = 'version = "1.2.10"\n ' * 30
5564
@@ -104,8 +113,25 @@ def multiple_versions_reduce_string(tmpdir):
104113
105114
106115@pytest .fixture (scope = "function" )
107- def version_files (commitizen_config_file , python_version_file , version_repeated_file ):
108- return [commitizen_config_file , python_version_file , version_repeated_file ]
116+ def docker_compose_file (tmpdir ):
117+ tmp_file = tmpdir .join ("docker-compose.yaml" )
118+ tmp_file .write (DOCKER_COMPOSE )
119+ return str (tmp_file )
120+
121+
122+ @pytest .fixture (scope = "function" )
123+ def version_files (
124+ commitizen_config_file ,
125+ python_version_file ,
126+ version_repeated_file ,
127+ docker_compose_file ,
128+ ):
129+ return [
130+ commitizen_config_file ,
131+ python_version_file ,
132+ version_repeated_file ,
133+ docker_compose_file ,
134+ ]
109135
110136
111137def test_update_version_in_files (version_files ):
You can’t perform that action at this time.
0 commit comments