A new repo is created by calling tuftool root init <path>. It is a common pattern when renewing an expiring root to then have to call tuftool root bump-version multiple times or tuftool root set-version.
Since this is so common, this change makes it possible to provide an optional initial version to root init to avoid needing to run multiple commmands. This adds an optional --version argument that can take a positive integer to set as the initial root version.
Testing done:
[x] Unit tests added covering success and failure cases.
[x] Viewed tuftool root init --help output and verified correct help information
[x] Ran normal tuftool root init test.json and verified created successfully with the normal initial version of 1
[x] Ran tuftool root init --version 5 test.json and verified created successfully with initial version set to 5
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
N/A
Description of changes:
A new repo is created by calling
tuftool root init <path>
. It is a common pattern when renewing an expiring root to then have to calltuftool root bump-version
multiple times ortuftool root set-version
.Since this is so common, this change makes it possible to provide an optional initial version to
root init
to avoid needing to run multiple commmands. This adds an optional--version
argument that can take a positive integer to set as the initial root version.Testing done:
tuftool root init --help
output and verified correct help informationtuftool root init test.json
and verified created successfully with the normal initial version of 1tuftool root init --version 5 test.json
and verified created successfully with initial version set to 5By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.