feat: improve and simplify targets.json
#125
Merged
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 adds a few neat features to simplify
targets.json:semvermodule (replaces"exclude_targets").targets.json(still defaults to static file./targets.json)go-gitmodule.This is implemented in a backward compatible way so that API clients don't have to change anything.
Each target can define some version constraints to express in which versions that target is supported:
{ "description": "Jumper T15", "version_supported": ">= v2.10.1" }nightlyrelease is now defined withsem_ver:{ "releases": { "nightly": { "sem_ver": "v3.0.0" } } }This means that
nightlyis considered to be "what will become v3.0.0", which means that we can exclude targets from nightly by using< 3, which won't have to be changed once v3 is released andnightlyis moving towards higher releases.Warning
Please note that when loading
targets.json,exclude_targetsattributes are overwritten with a new list computed with the new version constraints.