diff --git a/.github/workflows/scripts/update-registry-versions.sh b/.github/workflows/scripts/update-registry-versions.sh index dd59e96f2ac1..c6774ca236c9 100755 --- a/.github/workflows/scripts/update-registry-versions.sh +++ b/.github/workflows/scripts/update-registry-versions.sh @@ -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." @@ -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}" \ No newline at end of file +else + echo "No changes detected." + exit 0 +fi \ No newline at end of file diff --git a/data/registry/instrumentation-php-cakephp.yml b/data/registry/instrumentation-php-cakephp.yml index 67497d8c0523..380aadbae2be 100644 --- a/data/registry/instrumentation-php-cakephp.yml +++ b/data/registry/instrumentation-php-cakephp.yml @@ -14,4 +14,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 diff --git a/data/registry/instrumentation-php-curl.yml b/data/registry/instrumentation-php-curl.yml index eae06c813a55..b922638866e2 100644 --- a/data/registry/instrumentation-php-curl.yml +++ b/data/registry/instrumentation-php-curl.yml @@ -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 diff --git a/data/registry/instrumentation-php-extrdkafka.yml b/data/registry/instrumentation-php-extrdkafka.yml index a4486650097a..12091f79c2cb 100644 --- a/data/registry/instrumentation-php-extrdkafka.yml +++ b/data/registry/instrumentation-php-extrdkafka.yml @@ -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 diff --git a/data/registry/instrumentation-php-psr6.yml b/data/registry/instrumentation-php-psr6.yml index bbaf34792039..c7f511818a60 100644 --- a/data/registry/instrumentation-php-psr6.yml +++ b/data/registry/instrumentation-php-psr6.yml @@ -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