fix URLs
This commit is contained in:
23
.github/workflows/check-mod.yml
vendored
23
.github/workflows/check-mod.yml
vendored
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user