@@ -371,27 +371,28 @@ def test_changes_to_files_are_committed(git_repo: Path, caplog):
371
371
commit = true
372
372
373
373
[[tool.bumpversion.files]]
374
- filename = "helm/charts/somechart /Chart.yaml"
374
+ glob = "helm/charts/* /Chart.yaml"
375
375
376
376
"""
377
377
),
378
378
encoding = "utf-8" ,
379
379
)
380
- chart_path = git_repo / "helm" / "charts" / "somechart" / "Chart.yaml"
381
-
382
- chart_path .parent .mkdir (parents = True , exist_ok = True )
383
- chart_path .write_text (
384
- dedent (
385
- """
386
- appVersion: 0.1.26
387
- version: 0.1.26
380
+ chart_contents = dedent (
381
+ """
382
+ appVersion: 0.1.26
383
+ version: 0.1.26
388
384
389
- """
390
- )
385
+ """
391
386
)
387
+ chart1_path = git_repo / "helm" / "charts" / "somechart" / "Chart.yaml"
388
+ chart2_path = git_repo / "helm" / "charts" / "otherchart" / "Chart.yaml"
389
+ chart1_path .parent .mkdir (parents = True , exist_ok = True )
390
+ chart1_path .write_text (chart_contents , encoding = "utf-8" )
391
+ chart2_path .parent .mkdir (parents = True , exist_ok = True )
392
+ chart2_path .write_text (chart_contents , encoding = "utf-8" )
392
393
393
394
with inside_dir (git_repo ):
394
- run_command (["git" , "add" , str (chart_path ), str (config_path )])
395
+ run_command (["git" , "add" , str (chart1_path ), str ( chart2_path ), str (config_path )])
395
396
run_command (["git" , "commit" , "-m" , "Initial commit" ])
396
397
397
398
# Act
@@ -423,11 +424,18 @@ def test_changes_to_files_are_committed(git_repo: Path, caplog):
423
424
commit = true
424
425
425
426
[[tool.bumpversion.files]]
426
- filename = "helm/charts/somechart/Chart.yaml"
427
+ glob = "helm/charts/*/Chart.yaml"
428
+
429
+ """
430
+ )
431
+ assert chart1_path .read_text () == dedent (
432
+ """
433
+ appVersion: 0.2.0
434
+ version: 0.2.0
427
435
428
436
"""
429
437
)
430
- assert chart_path .read_text () == dedent (
438
+ assert chart2_path .read_text () == dedent (
431
439
"""
432
440
appVersion: 0.2.0
433
441
version: 0.2.0
0 commit comments