diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b6c097585..687567323d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- fix(index): include available SHA256 hashes in wheel links by @hakarrr in #2409 - fix(server): close tokenizer config files after reading by @cloudgpuapp in #2422 - fix(cache): preserve disk cache entries on lookup and evict least-recently-used states by @remote-controlled-man in #2423 - fix: size Python buffers to the actual context by @remote-controlled-man in #2436 diff --git a/scripts/releases-to-pep-503.sh b/scripts/releases-to-pep-503.sh index 8359624492..bdcf094c85 100755 --- a/scripts/releases-to-pep-503.sh +++ b/scripts/releases-to-pep-503.sh @@ -85,8 +85,12 @@ for release in $releases; do continue fi - wheel_urls=$(echo "$response" | jq -r '.assets[] | select(.name | endswith(".whl")) | .browser_download_url') - if [ -z "$wheel_urls" ]; then + wheel_assets=$(echo "$response" | jq -r ' + .assets[] | select(.name | endswith(".whl")) | + [.browser_download_url, + (if (.digest | type) == "string" then .digest else "" end)] | @tsv + ') + if [ -z "$wheel_assets" ]; then log_error "No wheel files found for release $release" continue fi @@ -95,8 +99,12 @@ for release in $releases; do release_version=$(echo "$release" | grep -oE "^[v]?[0-9]+\.[0-9]+\.[0-9]+") echo "

$release_version

" >> "$output_dir/llama-cpp-python/index.html" - echo "$wheel_urls" | while read -r asset; do - echo " $asset" >> "$output_dir/llama-cpp-python/index.html" + echo "$wheel_assets" | while IFS=$'\t' read -r asset digest; do + href="$asset" + if [[ "$digest" =~ ^sha256:([[:xdigit:]]{64})$ ]]; then + href="$asset#sha256=${BASH_REMATCH[1]}" + fi + echo " $asset" >> "$output_dir/llama-cpp-python/index.html" echo "
" >> "$output_dir/llama-cpp-python/index.html" done done