diff options
| author | Leitwolf11 | 2026-11-01 22:58:30 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-11-01 22:58:30 +0300 |
| commit | e66db1cf17714be2ebfeab37670ef3d8965fc7cc (patch) | |
| tree | 88a8b55a14e9bc6152608662d062c1624c2863cf /tools/VersionMain.cpp | |
| parent | e32c9d107274f42b9cca700475404c80e96533c5 (diff) | |
| download | catch3-e66db1cf17714be2ebfeab37670ef3d8965fc7cc.tar.gz | |
Answer the review of the tools
repo_info starts Git in the checkout with fixed commands, so a shell never
reads a path, reports an unknown state as null rather than clean, and
counts only files it can start. third_party reads every archive before
it changes a file and refuses two modes. version checks that the sources
make a distribution, computes every place before writing any, and
release_notes finds a three-number heading for a version with D = 0.
Diffstat (limited to 'tools/VersionMain.cpp')
| -rw-r--r-- | tools/VersionMain.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/VersionMain.cpp b/tools/VersionMain.cpp index a7fb123a..6f1c13cb 100644 --- a/tools/VersionMain.cpp +++ b/tools/VersionMain.cpp @@ -54,12 +54,19 @@ main(int argc, char **argv) } const auto version = FormatVersion(argument == "--next" ? NextVersion(*parsed) : *parsed); - SetVersion(*root, version, problems); + // The sources have to make a distribution before anything is changed. + (void)GenerateAmalgamation(*root, problems); if (problems.empty()) { - WriteAmalgamation(*root, - GenerateAmalgamation(*root, problems), - problems); + SetVersion(*root, version, problems); + } + if (problems.empty()) + { + const auto amalgamation = GenerateAmalgamation(*root, problems); + if (problems.empty()) + { + WriteAmalgamation(*root, amalgamation, problems); + } } if (problems.empty()) { |