Background
The variants section in variants.yml expects a list of deployment variants in array format.
When performing automated changes to a variant, such as bumping up the versions, traversing an array without knowing an items position isn't ideal nor performant, given the nature of this tool.
Solution
Change array to dictionary, so that it's easy to accomplish such a task, using tools such as yq
Specifics
Old format
variants:
- name: default
version_name: 0.0.1
version_number: 1
store_destination: AppStore
...
- name: beta
version_name: 0.0.1
version_number: 1
store_destination: TestFlight
...
- name: enterprise_release
version_name: 0.0.1
version_number: 1
store_destination: AppCenter
...
New format
variants:
default:
version_name: 0.0.1
version_number: 1
store_destination: AppStore
...
beta:
version_name: 0.0.1
version_number: 1
store_destination: TestFlight
...
enterprise_release:
version_name: 0.0.1
version_number: 1
store_destination: AppCenter
...
Background
The
variantssection invariants.ymlexpects a list of deployment variants in array format.When performing automated changes to a variant, such as bumping up the versions, traversing an array without knowing an items position isn't ideal nor performant, given the nature of this tool.
Solution
Change array to dictionary, so that it's easy to accomplish such a task, using tools such as yq
Specifics
Old format
New format