Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal version #77

Open
tbarbette opened this issue Oct 23, 2024 · 2 comments
Open

Minimal version #77

tbarbette opened this issue Oct 23, 2024 · 2 comments

Comments

@tbarbette
Copy link
Owner

We need a way to specify a script needs a specific version of NPF

In the %require section it will only start at the same time than tests.

Maybe a new section, a "%globalrequire" that runs directly before any test, or a config option like npf_min_ver=1.1.0

@tbarbette
Copy link
Owner Author

This works in NPF v2 (only a branch for now):

%require
npfv=${NPF_VERSION}
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
if [ -z "$npfv" $(version $npfv) -lt $(version "2.0.1") ]; then
    echo "You must update NPF (current version $npfv)! v2 is only available through NPF's github branch. Set the path in launch.sh."
    exit 1
fi

@tbarbette
Copy link
Owner Author

It should be documented so I leave this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant