mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Ignore beta and release candidates in :latest
Fixes https://github.com/pyenv/pyenv/issues/2450
This commit is contained in:
parent
2b22145670
commit
4e31668c21
1 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,13 @@
|
||||||
DEFINITION_PREFIX="${DEFINITION%%:*}"
|
DEFINITION_PREFIX="${DEFINITION%%:*}"
|
||||||
DEFINITION_TYPE="${DEFINITION_PREFIX%%-*}" # TODO: support non-CPython versions
|
DEFINITION_TYPE="${DEFINITION_PREFIX%%-*}" # TODO: support non-CPython versions
|
||||||
if [[ "${DEFINITION}" != "${DEFINITION_PREFIX}" ]]; then
|
if [[ "${DEFINITION}" != "${DEFINITION_PREFIX}" ]]; then
|
||||||
DEFINITION_CANDIDATES=($(python-build --definitions | grep -F "${DEFINITION_PREFIX}" | grep "^${DEFINITION_TYPE}" | sed -e '/-dev$/d' -e '/-src$/d' | sort -t. -k1,1r -k 2,2nr -k 3,3nr || true))
|
DEFINITION_CANDIDATES=\
|
||||||
|
($(python-build --definitions | \
|
||||||
|
grep -F "${DEFINITION_PREFIX}" | \
|
||||||
|
grep "^${DEFINITION_TYPE}" | \
|
||||||
|
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/(b|rc)[0-9]+$/d' | \
|
||||||
|
sort -t. -k1,1r -k 2,2nr -k 3,3nr \
|
||||||
|
|| true))
|
||||||
DEFINITION="${DEFINITION_CANDIDATES}"
|
DEFINITION="${DEFINITION_CANDIDATES}"
|
||||||
VERSION_NAME="${DEFINITION##*/}"
|
VERSION_NAME="${DEFINITION##*/}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue