Skip to content

Add just_version function to get the version of the just tool #2616

@nyurik

Description

@nyurik

While #2290 (minimal required just version) is being discussed, we may also want a separate path to ensure that the current runner meets our needs. Let's add a new function just_version() that returns a semver of the current just tool - this way recipes could use semver_matches(just_version(), "...") to see if just requirements are met for the project. Moreover, this could be added as some "prereq" recipe that most other recepes depend on - which will either succeed or fail with instructions to update just.

[private]
validate_just:
    if [ {{semver_matches(just_version(), ">1.38")}} != 'true' ]; then \
        echo "Your just runner is too old, please update" ;\
        exit 1 ;\
    fi

foo: validate_just
    echo "running foo"

In the mean time, we could already use something like {{semver_matches(shell(just_executable(), '--version'), ">1.38")}} as a temporary workaround until a new function is added

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions