fix: address review findings
- install.sh: verify SHA-256 checksum before installing binary - install.sh: fallback to ~/.local/bin if /usr/local/bin not writable - install.sh: use sed instead of grep for POSIX-safe JSON parsing - release.yml: remove jq dependency, parse release ID with sed - llm: make temperature configurable via --llm-temperature / LLM_TEMPERATURE - llm: add WithTemperature builder method on Client - llm: omit temperature from request when zero (uses server default)
This commit is contained in:
@@ -38,17 +38,27 @@ jobs:
|
||||
GITEA_URL="${{ github.server_url }}"
|
||||
REPO="${{ github.repository }}"
|
||||
|
||||
# Create release
|
||||
RELEASE_ID=$(curl -sSf -X POST \
|
||||
# Create release (parse ID without jq using grep/sed)
|
||||
RESPONSE=$(curl -sSf -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
"${GITEA_URL}/api/v1/repos/${REPO}/releases" \
|
||||
-d "{\"tag_name\": \"${VERSION}\", \"name\": \"${VERSION}\", \"body\": \"Release ${VERSION}\", \"draft\": false, \"prerelease\": false}" \
|
||||
| jq -r '.id')
|
||||
-d "{\"tag_name\": \"${VERSION}\", \"name\": \"${VERSION}\", \"body\": \"Release ${VERSION}\", \"draft\": false, \"prerelease\": false}")
|
||||
|
||||
RELEASE_ID=$(echo "$RESPONSE" | sed -n 's/.*"id":\([0-9]*\).*/\1/p' | head -1)
|
||||
|
||||
if [ -z "$RELEASE_ID" ]; then
|
||||
echo "Failed to create release" >&2
|
||||
echo "$RESPONSE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Created release ID: ${RELEASE_ID}"
|
||||
|
||||
# Upload each asset
|
||||
for file in dist/*; do
|
||||
filename=$(basename "$file")
|
||||
echo "Uploading ${filename}..."
|
||||
curl -sSf -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
@@ -56,4 +66,4 @@ jobs:
|
||||
--data-binary "@${file}"
|
||||
done
|
||||
|
||||
echo "Release ${VERSION} created with $(ls dist/* | wc -l) assets"
|
||||
echo "Release ${VERSION} created with assets"
|
||||
|
||||
Reference in New Issue
Block a user