chore: Separate package version and Git resource functions from create release #440
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is part of a series that adds support to the CLI for interacting with runbooks stored in Git for version controlled projects
Background
Git runbooks operate differently to runbooks stored in the Octopus database in that there are no draft/published snapshots, these are replaced with running a runbook using a Git reference such as
main. This means that in order to run a runbook that uses packages or Git resources these need to be supplied as part of the run creation.Changes
This PR moves some of the common functions for resolving package versions and Git resources from the
releases/createpackage into their own packages.Reducing risk
There are lots of tests for creating releases which have had only mechanical changes, these should all pass and give us confidence that this change is good. We could look to separate some of the tests for package version resolution in this PR, however I've opted to tackle that separately to give us confidence in this initial change.