Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuftool: Allow specifying version in root init #646

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

stmcginnis
Copy link
Contributor

@stmcginnis stmcginnis commented Aug 8, 2023

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 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:

  • Unit tests added covering success and failure cases.
  • Viewed tuftool root init --help output and verified correct help information
  • Ran normal tuftool root init test.json and verified created successfully with the normal initial version of 1
  • 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.

tuftool/src/root.rs Outdated Show resolved Hide resolved
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
option initial version to `root init` to avoid needing to run multiple
commmands. This adds an optional `--version` or `-v` argument that can
take a positive integer to set as the initial root version.

Signed-off-by: Sean McGinnis <[email protected]>
@stmcginnis stmcginnis merged commit c8ca39f into awslabs:develop Aug 8, 2023
@stmcginnis stmcginnis deleted the root-init-version branch August 8, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants