Skip to content

Change variants from array to dictionary #114

@arthurpalves

Description

@arthurpalves

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
        ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions