Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 12 additions & 4 deletions scripts/releases-to-pep-503.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -95,8 +99,12 @@ for release in $releases; do
release_version=$(echo "$release" | grep -oE "^[v]?[0-9]+\.[0-9]+\.[0-9]+")
echo " <h2>$release_version</h2>" >> "$output_dir/llama-cpp-python/index.html"

echo "$wheel_urls" | while read -r asset; do
echo " <a href=\"$asset\">$asset</a>" >> "$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 " <a href=\"$href\">$asset</a>" >> "$output_dir/llama-cpp-python/index.html"
echo " <br>" >> "$output_dir/llama-cpp-python/index.html"
done
done
Expand Down