diff --git a/CHANGELOG.md b/CHANGELOG.md index b7222da104..4c6cfc1fa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ - Update the Code of Conduct ([#2381](https://github.com/nf-core/tools/pull/2381)) - Remove `--no-git` option from `nf-core create` ([#2394](https://github.com/nf-core/tools/pull/2394)) - Throw warning when custom workflow name contains special characters ([#2401](https://github.com/nf-core/tools/pull/2401)) +- Bump version of nf-test snapshot files with `nf-core bump-version` ([#2410](https://github.com/nf-core/tools/pull/2410)) # [v2.9 - Chromium Falcon](https://github.com/nf-core/tools/releases/tag/2.9) + [2023-06-29] diff --git a/nf_core/bump_version.py b/nf_core/bump_version.py index 5f4616edfb..ada7f0b994 100644 --- a/nf_core/bump_version.py +++ b/nf_core/bump_version.py @@ -60,6 +60,20 @@ def bump_pipeline_version(pipeline_obj, new_version): ), ], ) + # nf-test snap files + pipeline_name = pipeline_obj.nf_config.get("manifest.name", "").strip(" '\"") + snap_files = [f for f in Path().glob("tests/pipeline/*.snap")] + for snap_file in snap_files: + update_file_version( + snap_file, + pipeline_obj, + [ + ( + f"{pipeline_name}={current_version}", + f"{pipeline_name}={new_version}", + ) + ], + ) def bump_nextflow_version(pipeline_obj, new_version):