Handle snapshot command when a new snapshot is not needed
If snapshot is not needed when user calls it (no targets versions were added or updated), avoid bumping snapshot version and expiry. This is useful in tuf-demo because the snapshot process can then run after every push and won't need complex logic to figure out when it needs to run.
This should then allow the snapshot task in tuf-demo workflow to look something like:
tufrepo snapshot
tufrepo verify --root-hash 24d9b03f10ce0fe2e648833de26af60a4a8cd4e65bb396a8200a3194ae8ea76e
# only set value to true if we really created a new snapshot, not if new snapshot was not needed
git diff --quiet || echo "::set-output name=snapshot::true"
Handle snapshot command when a new snapshot is not needed
If snapshot is not needed when user calls it (no targets versions were added or updated), avoid bumping snapshot version and expiry. This is useful in tuf-demo because the snapshot process can then run after every push and won't need complex logic to figure out when it needs to run.
This should then allow the snapshot task in tuf-demo workflow to look something like:
Fixes #37