mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 08:39:47 +00:00
Fixed URLs by encoding spaces
This commit is contained in:
parent
47309fd7ea
commit
81ac80f739
15
.github/workflows/build-and-release.yml
vendored
15
.github/workflows/build-and-release.yml
vendored
@ -648,6 +648,18 @@ jobs:
|
||||
# Here, we create the JSON object:
|
||||
platforms_json=$(jq -n '{}')
|
||||
|
||||
# Define the urlencode function:
|
||||
urlencode() {
|
||||
local length="${#1}"
|
||||
for (( i = 0; i < length; i++ )); do
|
||||
local c="${1:i:1}"
|
||||
case $c in
|
||||
[a-zA-Z0-9.~_-]) printf "$c" ;;
|
||||
*) printf '%%%02X' "'$c" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Iterate over all signature files:
|
||||
while IFS= read -r -d '' sig_file; do
|
||||
|
||||
@ -678,7 +690,8 @@ jobs:
|
||||
|
||||
# Extract the artifact name and create the URL:
|
||||
artifact_name=$(basename "$sig_file" .sig)
|
||||
url="https://github.com/MindWorkAI/AI-Studio/releases/download/$FORMATTED_VERSION/$artifact_name"
|
||||
encoded_artifact_name=$(urlencode "$artifact_name")
|
||||
url="https://github.com/MindWorkAI/AI-Studio/releases/download/$FORMATTED_VERSION/$encoded_artifact_name"
|
||||
|
||||
# Build the JSON object:
|
||||
platforms_json=$(echo "$platforms_json" | jq --arg platform "$platform" --arg signature "$signature" --arg url "$url" '.[$platform] = {"signature": $signature, "url": $url}')
|
||||
|
Loading…
Reference in New Issue
Block a user