Skip to content

Commit

Permalink
Fixed URL encoding accordingly to GitHub (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
SommerEngineering authored Jun 26, 2024
1 parent 6170e0c commit 50a03e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -662,18 +662,6 @@ 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
}
# Display the structure of the release directory:
ls -Rlhat $GITHUB_WORKSPACE/release/assets
Expand Down Expand Up @@ -713,7 +701,11 @@ jobs:
# Extract the artifact name and create the URL:
artifact_name=$(basename "$sig_file" .sig)
encoded_artifact_name=$(urlencode "$artifact_name")
# Replaces spaces by '.':
encoded_artifact_name=$(echo "$artifact_name" | sed 's/ /./g')
# Create the URL:
url="https://github.com/MindWorkAI/AI-Studio/releases/download/$FORMATTED_VERSION/$encoded_artifact_name"

# Build the JSON object:
Expand Down
2 changes: 1 addition & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
1.79.0 (commit 129f3b996)
6.20.0
1.6.1
2818aa93411, dev debug
2818aa93411, release

0 comments on commit 50a03e6

Please sign in to comment.