refactor: consolidate version finding across version strategies #1125
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.
Description
Initially there was a single version strategy of 'github' which meant the location was standardised. Then came k8s as a version strategy which took a different approach and so needed a different implementation. Later came Gitlab which required another implementation.
This change consolidates the various release finding approaches into a single function, which varied based on attributes held about the release 'platform'.
As a demonstration of the benefit of the approach GitLab has been added as a release platform and the GitLab CLI which is hosted on gitlab has been added as a tool - superseding #1122
Motivation and Context
design/approved
by a maintainer (required)Fixes Add glab cli support #1119
Closes feat: add glab cli #1122
How Has This Been Tested?
Functional
make e2e
test-tool.sh glab
Types of changes
Documentation
./arkade get --format markdown
./arkade install --help
Checklist:
My code follows the code style of this project.
My change requires a change to the documentation.
I have updated the documentation accordingly.
I've read the CONTRIBUTION guide
I have signed-off my commits with
git commit -s
I have tested this on arm, or have added code to prevent deployment