-
Notifications
You must be signed in to change notification settings - Fork 14
/
plugin-self-test
executable file
·20 lines (17 loc) · 773 Bytes
/
plugin-self-test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# Build and publish the dependency graph plugin
./gradlew :plugin:publishPluginMavenPublicationToLocalPluginsRepository
# Invoke a build extracting the GitHub Dependency Graph
./gradlew --no-configuration-cache --no-build-cache -I plugin-self-test.init.gradle $*
if [[ -z "${GITHUB_TOKEN}" ]]; then
echo "GITHUB_TOKEN must be set in order to submit dependency graph"
else
# Submit the dependency graph to GitHub
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/gradle/github-dependency-graph-gradle-plugin/dependency-graph/snapshots \
-d @build/reports/dependency-graph-snapshots/plugin-self-test.json
fi