1
0
mirror of synced 2026-06-29 23:00:48 +00:00

Make plugin support gate rely on the CLI behavior instead of semver

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
Matheus Pimenta
2026-06-29 09:18:17 +01:00
parent 2c1eec5c0f
commit 456d935ae1
+3 -4
View File
@@ -169,15 +169,14 @@ runs:
id: plugin-support-gate id: plugin-support-gate
shell: bash shell: bash
if: inputs.plugins != '' if: inputs.plugins != ''
env:
V1: ${{ steps.setup-flux-bin.outputs.installed-flux-version }}
run: | run: |
if [ "$(printf '%s\n%s' "$V1" "2.9.0" | sort -V | tail -n1)" = "$V1" ]; then flux_version="$(flux -v 2>/dev/null | awk '{print $3}')"
if flux plugin --help >/dev/null 2>&1; then
echo plugin-support="yes" >> $GITHUB_OUTPUT echo plugin-support="yes" >> $GITHUB_OUTPUT
exit 0 exit 0
else else
echo plugin-support="no" >> $GITHUB_OUTPUT echo plugin-support="no" >> $GITHUB_OUTPUT
msg="Installed Flux version $V1 does not support plugins; need >= 2.9.0. Requested plugins cannot be installed." msg="Installed Flux version ${flux_version:-unknown} does not support plugins; need >= 2.9.0. Requested plugins cannot be installed."
echo "::error title=Unsupported Flux version::$msg" echo "::error title=Unsupported Flux version::$msg"
echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY
echo "> $msg" >> $GITHUB_STEP_SUMMARY echo "> $msg" >> $GITHUB_STEP_SUMMARY