Skip to content

Add indexer to store & retrieve custom properties to MinVerVersion #3

@augustoproiete

Description

@augustoproiete

Sometimes the MinVer generated version is the starting point to generate other (custom) representations of version(s), which may or may not be SemVer-compliant.

var version = MinVer();
string customVersion1 = null; // Initialized via Setup
string customVersion2 = null; // Initialized via Setup

Task("build")
    .Does(() =>
{
    // use customVersion1
    // use customVersion2
});

Setup(context =>
{
    customVersion1 = BuildCustomVersion(version, "A");
    customVersion2 = BuildCustomVersion(version, "B");
}

It would be nice if we could have something like this instead:

var version = MinVer();

Task("build")
    .Does(() =>
{
    // use version["custom1"]
    // use version["custom2"]
});

Setup(context =>
{
    version["custom1"] = BuildCustomVersion(version, "A");
    version["custom2"] = BuildCustomVersion(version, "B");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions