Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix registry version updater #5685

Merged
merged 2 commits into from
Dec 3, 2024
Merged
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
30 changes: 20 additions & 10 deletions .github/workflows/scripts/update-registry-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ for yaml_file in ${FILES}; do
echo "${yaml_file}: Package name and/or registry are missing in the YAML file."
else
# Get latest version
latest_version=$(get_latest_version "$name" "$registry")
latest_version=$(get_latest_version "$name" "$registry" || echo "Could not fetch version.")

if [ "$latest_version" == "Registry not supported." ]; then
if [ "$latest_version" == "Could not fetch version." ]; then
echo "${yaml_file} ($registry): Registry not supported.";
elif [ "$latest_version" == "Registry not supported." ]; then
echo "${yaml_file} ($registry): Registry not supported.";
elif [ -z "$latest_version" ]; then
echo "${yaml_file} ($registry): Could not get latest version from registry."
Expand Down Expand Up @@ -118,14 +120,22 @@ if [ "$existing_pr_count" -gt 0 ]; then
exit 0
fi

$NPM run fix:format
if [[ -n $(git status --porcelain) ]]; then
echo "Versions have been updated, formatting and pushing changes."

$NPM run fix:format

$GIT checkout -b "$branch"
$GIT commit -a -m "$message"
$GIT push --set-upstream origin "$branch"

$GIT checkout -b "$branch"
$GIT commit -a -m "$message"
$GIT push --set-upstream origin "$branch"
body_file=$(mktemp)
echo -en "${body}" >> "${body_file}"

body_file=$(mktemp)
echo -en "${body}" >> "${body_file}"
echo "Submitting auto-update PR '$message'."
$GH pr create --title "$message" --body-file "${body_file}"

echo "Submitting auto-update PR '$message'."
$GH pr create --title "$message" --body-file "${body_file}"
else
echo "No changes detected."
exit 0
fi
5 changes: 5 additions & 0 deletions data/registry/instrumentation-php-cakephp.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# cSpell:ignore cakephp
title: OpenTelemetry CakePHP instrumentation library
registryType: instrumentation
language: php
Expand All @@ -14,4 +15,8 @@ description:
authors:
- name: OpenTelemetry Authors
createdAt: 2024-07-08
package:
registry: packagist
name: open-telemetry/opentelemetry-auto-cakephp
version: 0.0.3
isFirstParty: false
2 changes: 1 addition & 1 deletion data/registry/instrumentation-php-curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ authors:
createdAt: 2024-11-18
package:
registry: packagist
name: opentelemetry-auto-curl
name: open-telemetry/opentelemetry-auto-curl
version: 0.0.1
isFirstParty: false
2 changes: 1 addition & 1 deletion data/registry/instrumentation-php-extrdkafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ authors:
createdAt: 2024-11-18
package:
registry: packagist
name: opentelemetry-auto-ext-rdkafka
name: open-telemetry/opentelemetry-auto-ext-rdkafka
version: 0.0.1
isFirstParty: false
4 changes: 4 additions & 0 deletions data/registry/instrumentation-php-psr6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ description:
authors:
- name: OpenTelemetry Authors
createdAt: 2024-07-08
package:
registry: packagist
name: open-telemetry/opentelemetry-auto-psr6
version: 0.0.3
isFirstParty: false
16 changes: 16 additions & 0 deletions static/refcache.json
Original file line number Diff line number Diff line change
Expand Up @@ -10563,14 +10563,26 @@
"StatusCode": 200,
"LastSeen": "2024-08-09T11:02:21.246316-04:00"
},
"https://packagist.org/packages/open-telemetry/opentelemetry-auto-cakephp": {
"StatusCode": 200,
"LastSeen": "2024-12-03T11:06:06.86216+01:00"
},
"https://packagist.org/packages/open-telemetry/opentelemetry-auto-codeigniter": {
"StatusCode": 200,
"LastSeen": "2024-01-19T13:15:35.481102+01:00"
},
"https://packagist.org/packages/open-telemetry/opentelemetry-auto-curl": {
"StatusCode": 200,
"LastSeen": "2024-12-03T10:13:27.914323+01:00"
},
"https://packagist.org/packages/open-telemetry/opentelemetry-auto-ext-amqp": {
"StatusCode": 200,
"LastSeen": "2024-01-19T13:15:35.677617+01:00"
},
"https://packagist.org/packages/open-telemetry/opentelemetry-auto-ext-rdkafka": {
"StatusCode": 200,
"LastSeen": "2024-12-03T10:13:28.648777+01:00"
},
"https://packagist.org/packages/open-telemetry/opentelemetry-auto-guzzle": {
"StatusCode": 200,
"LastSeen": "2024-01-19T13:15:35.857673+01:00"
Expand Down Expand Up @@ -10619,6 +10631,10 @@
"StatusCode": 200,
"LastSeen": "2024-01-19T13:15:37.331332+01:00"
},
"https://packagist.org/packages/open-telemetry/opentelemetry-auto-psr6": {
"StatusCode": 200,
"LastSeen": "2024-12-03T10:13:31.800557+01:00"
},
"https://packagist.org/packages/open-telemetry/opentelemetry-auto-slim": {
"StatusCode": 200,
"LastSeen": "2024-01-19T13:15:37.510707+01:00"
Expand Down
Loading