Skip to content

Commit 4cd7d59

Browse files
Add maven to registry auto update workflow (#5586)
Signed-off-by: svrnm <[email protected]> Co-authored-by: opentelemetrybot <[email protected]>
1 parent b20a22d commit 4cd7d59

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/scripts/update-registry-versions.sh

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
UPDATE_YAML="yq eval -i"
44
GIT=git
55
GH=gh
6+
NPM=npm
67
FILES="${FILES:-./data/registry/*.yml}"
78

89

@@ -16,6 +17,7 @@ elif [[ "$1" != "-f" ]]; then
1617
UPDATE_YAML="yq eval"
1718
GIT="echo > DRY RUN: git "
1819
GH="echo > DRY RUN: gh "
20+
NPM="echo > DRY RUN: npm "
1921
else
2022
# Local execution with -f flag (force real vs. dry run)
2123
shift
@@ -59,6 +61,12 @@ for yaml_file in ${FILES}; do
5961
hex)
6062
curl -s "https://hex.pm/api/packages/$package_name" | jq -r '.releases | max_by(.inserted_at) | .version'
6163
;;
64+
maven)
65+
groupid=$(echo "${package_name}" | cut -d/ -f1)
66+
artifactid=$(echo "${package_name}" | cut -d/ -f2)
67+
#curl -s "https://search.maven.org/solrsearch/select?q=g:com.google.inject+AND+a:guice&core=gav&rows=20&wt=json" | jq -r '.response.docs[0].v'
68+
curl -s "https://search.maven.org/solrsearch/select?q=g:${groupid}+AND+a:${artifactid}&core=gav&rows=20&wt=json" | jq -r '.response.docs[0].v'
69+
;;
6270
*)
6371
echo "Registry not supported."
6472
;;
@@ -110,6 +118,8 @@ if [ "$existing_pr_count" -gt 0 ]; then
110118
exit 0
111119
fi
112120

121+
$NPM run fix:format
122+
113123
$GIT checkout -b "$branch"
114124
$GIT commit -a -m "$message"
115125
$GIT push --set-upstream origin "$branch"

data/registry/instrumentation-java-finatra.yml

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ urls:
1515
repo: https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/finatra-2.9
1616
createdAt: 2020-11-05
1717
isFirstParty: false
18+
package:
19+
registry: maven
20+
name: io.opentelemetry.javaagent.instrumentation/opentelemetry-javaagent-finatra-2.9

0 commit comments

Comments
 (0)