File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ for version in "${versions[@]}"; do
57
57
possibles=( $(
58
58
{
59
59
git ls-remote --tags https://github.com/python/cpython.git " refs/tags/v${rcVersion} .*" \
60
- | sed -r ' s!^.*refs/tags/v([0-9 .]+).*$!\1!' \
60
+ | sed -r ' s!^.*refs/tags/v([0-9a-z .]+).*$!\1!' \
61
61
|| :
62
62
63
63
# this page has a very aggressive varnish cache in front of it, which is why we also scrape tags from GitHub
@@ -68,9 +68,22 @@ for version in "${versions[@]}"; do
68
68
} | sort -ruV
69
69
) )
70
70
fullVersion=
71
+ declare -A impossible=()
71
72
for possible in " ${possibles[@]} " ; do
73
+ rcPossible=" ${possible% [a-z]* } "
74
+
75
+ # varnish is great until it isn't
76
+ if wget -q -O /dev/null -o /dev/null --spider " https://www.python.org/ftp/python/$rcPossible /Python-$possible .tar.xz" ; then
77
+ fullVersion=" $possible "
78
+ break
79
+ fi
80
+
81
+ if [ -n " ${impossible[$rcPossible]:- } " ]; then
82
+ continue
83
+ fi
84
+ impossible[$rcPossible ]=1
72
85
possibleVersions=( $(
73
- curl -fsSL " https://www.python.org/ftp/python/$possible /" \
86
+ wget -qO- -o /dev/null " https://www.python.org/ftp/python/$rcPossible /" \
74
87
| grep ' <a href="Python-' " $rcVersion " ' .*\.tar\.xz"' \
75
88
| sed -r ' s!.*<a href="Python-([^"/]+)\.tar\.xz".*!\1!' \
76
89
| grep $rcGrepV -E -- ' [a-zA-Z]+' \
You can’t perform that action at this time.
0 commit comments