diff options
author | Etienne Pierre-doray <etiennep@chromium.org> | 2021-10-28 21:16:04 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2021-10-28 14:31:23 -0700 |
commit | b90a947429fdce96b1d684b9a7af9683cb4a13c1 (patch) | |
tree | 333e034b74f5ec4cfb1be1600c4d1a061afbb3bc /zucchini_commands.cc | |
parent | aff408603b3db5b7974c522db2ad8c5ce2a0f3c1 (diff) | |
download | zucchini-b90a947429fdce96b1d684b9a7af9683cb4a13c1.tar.gz |
[Zucchini]: Add patch version.
This is a breaking change to zucchini patch format:
Zucchini 1.0, see changelog.
Add major/minor patch-wide version, and element version.
Also add VerifyPatch() API and command line option to verify
patch compatibility.
Design: go/zucchini-versions
Bug: 1231882
Change-Id: I19f1fbe2ee866c23f0814ffe6a912fb72812edbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3140224
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#936096}
NOKEYCHECK=True
GitOrigin-RevId: 559d77a9741428a48add017d389d104e431e6de7
Diffstat (limited to 'zucchini_commands.cc')
-rw-r--r-- | zucchini_commands.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zucchini_commands.cc b/zucchini_commands.cc index 93929bd..0699cbe 100644 --- a/zucchini_commands.cc +++ b/zucchini_commands.cc @@ -51,6 +51,11 @@ zucchini::status::Code MainApply(MainParams params) { params.command_line.HasSwitch(kSwitchKeep)); } +zucchini::status::Code MainVerify(MainParams params) { + CHECK_EQ(1U, params.file_paths.size()); + return zucchini::VerifyPatch(params.file_paths[0]); +} + zucchini::status::Code MainRead(MainParams params) { CHECK_EQ(1U, params.file_paths.size()); base::File input_file(params.file_paths[0], |