diff --git a/.github/pipeline-version b/.github/pipeline-version index c6a567b..f2fb3d7 100644 --- a/.github/pipeline-version +++ b/.github/pipeline-version @@ -1 +1 @@ -1.36.2 +1.36.5 diff --git a/.github/workflows/pb-update-new-relic-dotnet.yml b/.github/workflows/pb-update-new-relic-dotnet.yml index d7fb748..1ffd168 100644 --- a/.github/workflows/pb-update-new-relic-dotnet.yml +++ b/.github/workflows/pb-update-new-relic-dotnet.yml @@ -52,12 +52,14 @@ jobs: set -euo pipefail - if [ -z "${ARCH}" ]; then - ARCH="amd64" - fi + VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") + ARCH=${ARCH:-amd64} + OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - OLD_VERSION=$(yj -tj < buildpack.toml | \ - jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) ) | select( .purl | contains( env.ARCH ) ) | .version") + if [ -z "$OLD_VERSION" ]; then + ARCH="" # empty means noarch + OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") + fi update-buildpack-dependency \ --buildpack-toml buildpack.toml \ diff --git a/.github/workflows/pb-update-new-relic-java.yml b/.github/workflows/pb-update-new-relic-java.yml index 4af5d4e..13544b5 100644 --- a/.github/workflows/pb-update-new-relic-java.yml +++ b/.github/workflows/pb-update-new-relic-java.yml @@ -55,12 +55,14 @@ jobs: set -euo pipefail - if [ -z "${ARCH}" ]; then - ARCH="amd64" - fi + VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") + ARCH=${ARCH:-amd64} + OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - OLD_VERSION=$(yj -tj < buildpack.toml | \ - jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) ) | select( .purl | contains( env.ARCH ) ) | .version") + if [ -z "$OLD_VERSION" ]; then + ARCH="" # empty means noarch + OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") + fi update-buildpack-dependency \ --buildpack-toml buildpack.toml \ diff --git a/.github/workflows/pb-update-new-relic-nodejs.yml b/.github/workflows/pb-update-new-relic-nodejs.yml index 08e54fb..4eca988 100644 --- a/.github/workflows/pb-update-new-relic-nodejs.yml +++ b/.github/workflows/pb-update-new-relic-nodejs.yml @@ -52,12 +52,14 @@ jobs: set -euo pipefail - if [ -z "${ARCH}" ]; then - ARCH="amd64" - fi + VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") + ARCH=${ARCH:-amd64} + OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - OLD_VERSION=$(yj -tj < buildpack.toml | \ - jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) ) | select( .purl | contains( env.ARCH ) ) | .version") + if [ -z "$OLD_VERSION" ]; then + ARCH="" # empty means noarch + OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") + fi update-buildpack-dependency \ --buildpack-toml buildpack.toml \ diff --git a/.github/workflows/pb-update-new-relic-php.yml b/.github/workflows/pb-update-new-relic-php.yml index 1f0bcfe..0767fee 100644 --- a/.github/workflows/pb-update-new-relic-php.yml +++ b/.github/workflows/pb-update-new-relic-php.yml @@ -52,12 +52,14 @@ jobs: set -euo pipefail - if [ -z "${ARCH}" ]; then - ARCH="amd64" - fi + VERSION_DEPS=$(yj -tj < buildpack.toml | jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) )") + ARCH=${ARCH:-amd64} + OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r 'select( .purl | contains( env.ARCH ) ) | .version') - OLD_VERSION=$(yj -tj < buildpack.toml | \ - jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) ) | select( .purl | contains( env.ARCH ) ) | .version") + if [ -z "$OLD_VERSION" ]; then + ARCH="" # empty means noarch + OLD_VERSION=$(echo "$VERSION_DEPS" | jq -r ".version") + fi update-buildpack-dependency \ --buildpack-toml buildpack.toml \