Skip to content

Use variables (including Version) with multiple packages #988

@BatmanAoD

Description

@BatmanAoD

There should be a way to use Knope's variables, including Version, with multiple packages.

[old description]

Since determining the version of a package is nontrivial, and it's often useful in scripts (e.g. in CI), I think it would be a great feature if Knope could detect the current version(s) of packages and print that, without doing anything else.

Users could probably parse this information out of knope release --dry-run, but that's a bit awkward.

The primary use case I'm thinking of is to replace stuff like git describe --abbrev=0 --tags | sed 's/v//', so the output must be easy to parse. For a standard, single package, it could just print the version it finds; for multiple packages, it could print <name>=<version>, one on each line. Just like release, when a package has multiple versioned files and their versions don't match, it should just print an error of some kind.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions