Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ To see whether your library or framework is supported, visit [this page](https:/
If you’d like yours to appear there as well, open a pull request updating [this JSON file](https://github.com/oracle/graalvm-reachability-metadata/blob/master/library-and-framework-list.json).
Before submitting a pull request, please read [this guide](docs/CONTRIBUTING.md#tested-libraries-and-frameworks).

You can also check if metadata for a library exists on the repository directly from your terminal without cloning it using:
```
curl -sSL https://raw.githubusercontent.com/oracle/graalvm-reachability-metadata/master/check-library-support.sh | bash -s "<groupId>:<artifactId>:<version>"
```

### 📚 Request Support for a New Library

Open a [library-request ticket](https://github.com/oracle/graalvm-reachability-metadata/issues/new?template=01_support_new_library.yml), include the Maven coordinates, and our automation will take it from there (🤖).
Expand Down
34 changes: 34 additions & 0 deletions check-library-support.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <groupId>:<artifactId>:<version>"
exit 1
fi

GAV="$1"
IFS=':' read -r GROUP ARTIFACT VERSION <<< "$GAV"

REMOTE_BASE_URL="https://raw.githubusercontent.com/oracle/graalvm-reachability-metadata/master/metadata"
REMOTE_INDEX_URL="$REMOTE_BASE_URL/$GROUP/$ARTIFACT/index.json"

INDEX_CONTENT=$(curl -fsSL "$REMOTE_INDEX_URL" 2>/dev/null || true)

if [[ -z "$INDEX_CONTENT" ]]; then
echo "Library $GAV is NOT supported by the GraalVM Reachability Metadata repository."
exit 1
fi

FOUND=$(
awk -v ver="$VERSION" '
/"tested-versions"[[:space:]]*:/ {inside=1; next}
inside && /\]/ {inside=0}
inside && $0 ~ "\"" ver "\"" {print "yes"}
' <<< "$INDEX_CONTENT"
)

if [ "$FOUND" = "yes" ]; then
echo "Library $GAV is supported by the GraalVM Reachability Metadata repository."
else
echo "Library $GAV is NOT supported by the GraalVM Reachability Metadata repository."
fi
Loading