1
0
This commit is contained in:
Ö. Efe D.
2025-01-16 18:25:19 +01:00
parent f902132c92
commit 6937c09833
2 changed files with 25 additions and 2 deletions

View File

@@ -71,6 +71,29 @@ jobs:
files: | files: |
mods/*/meta.json mods/*/meta.json
- name: Validate Download URLs
run: |
for dir in mods/*/; do
if [ -d "$dir" ]; then
MOD_DIR="$(basename "$dir")"
META_JSON="$dir/meta.json"
# Check if downloadURL exists and is not empty
DOWNLOAD_URL=$(jq -r '.downloadURL // empty' "$META_JSON")
if [ -z "$DOWNLOAD_URL" ]; then
echo "Error: Missing or empty downloadURL in $MOD_DIR/meta.json"
exit 1
fi
# Optional: Check if URL is accessible
if ! curl --output /dev/null --silent --head --fail "$DOWNLOAD_URL"; then
echo "Error: downloadURL in $MOD_DIR/meta.json is not accessible"
exit 1
fi
fi
done
review-and-approve: review-and-approve:
needs: validate # This job will only run after 'validate' completes successfully. needs: validate # This job will only run after 'validate' completes successfully.
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -4,5 +4,5 @@
"categories": ["Content"], "categories": ["Content"],
"author": "Halo / OfficialHalo", "author": "Halo / OfficialHalo",
"repo": "https://github.com/0fficialHalo/Gemstones", "repo": "https://github.com/0fficialHalo/Gemstones",
"downloadURL": "https://github.com/0fficialHalo/Gemstones/releases/latest/Gemstones.zip" "downloadURL": "https://github.com/0fficialHalo/Gemstones/releases/latest/download/Gemstones.zip"
} }