File tree 2 files changed +29
-3
lines changed
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:
205
205
206
206
def _version_to_regex (version : str ):
207
207
clean_regex = version .replace ("." , r"\." ).replace ("+" , r"\+" )
208
- return re .compile (f"\\ b { clean_regex } \\ b " )
208
+ return re .compile (f"{ clean_regex } " )
209
209
210
210
211
211
def create_tag (version : Union [Version , str ], tag_format : Optional [str ] = None ):
Original file line number Diff line number Diff line change 50
50
version = "1.2.3"
51
51
"""
52
52
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
+
53
62
MULTIPLE_VERSIONS_INCREASE_STRING = 'version = "1.2.9"\n ' * 30
54
63
MULTIPLE_VERSIONS_REDUCE_STRING = 'version = "1.2.10"\n ' * 30
55
64
@@ -104,8 +113,25 @@ def multiple_versions_reduce_string(tmpdir):
104
113
105
114
106
115
@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
+ ]
109
135
110
136
111
137
def test_update_version_in_files (version_files ):
You can’t perform that action at this time.
0 commit comments