diff --git a/README.md b/README.md index 734feb0..5374e11 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ you will have to change the inputs accordingly. We also recommend replacing bran - `latest`: this will use the latest release of GAP. This will **not** point to the latest pre-release if it is more recent than the latest release. - `minimal`: this will use oldest version of GAP that is supported by both the GAP package in the current directory, and this - action (which currently means GAP 4.9). + action (which currently means GAP 4.9.1). - version numbers: e.g. `v4.14.0`, `v4.15.0-beta1`, etc. The leading `v` is optional, the oldest available release is `v4.10.0`. - incomplete version numbers: e.g. `v4`, `v4.10`, etc. These will be expanded to the most recent release starting with the incomplete version number, e.g. `v4.10` is equivalent to `v4.10.2`. This will **not** expand to pre-releases, and again the leading `v` is diff --git a/action.yml b/action.yml index f57ad89..76ad044 100644 --- a/action.yml +++ b/action.yml @@ -90,7 +90,7 @@ runs: id: version shell: bash env: - OLDEST_VER: "4.9" + OLDEST_VER: "4.9.1" run: | VERSION="" IS_RELEASE=true @@ -124,9 +124,13 @@ runs: # Remove leading stuff if present PKG_VER=${PKG_VER##*[>= ]} - # Ensure the extracted version is not below the oldest GAP version supported by this GAP acttion + # Ensure the extracted version is not below the oldest GAP version supported by this GAP action + REL=$(printf '%s\n' "${PKG_VER}" "${OLDEST_VER}" | sort -V | tail -n1) - echo "Version: turned \"${PKG_VER}\" into \"${REL}\"" + if [[ "${PKG_VER}" != "${REL}" ]]; then + echo "Version: ${PKG_VER} not supported by this action, using ${REL} instead" + fi + else echo "::error::Could not extract minimal supported version from PackageInfo.g." exit 1