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-maven-3.yml b/.github/workflows/pb-update-maven-3.yml index 9d713b0..9a6b854 100644 --- a/.github/workflows/pb-update-maven-3.yml +++ b/.github/workflows/pb-update-maven-3.yml @@ -57,12 +57,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-maven-4.yml b/.github/workflows/pb-update-maven-4.yml index 6eab403..1aa2cd6 100644 --- a/.github/workflows/pb-update-maven-4.yml +++ b/.github/workflows/pb-update-maven-4.yml @@ -57,12 +57,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-maven-daemon-0.yml b/.github/workflows/pb-update-maven-daemon-0.yml index 5eea3b6..6f63f22 100644 --- a/.github/workflows/pb-update-maven-daemon-0.yml +++ b/.github/workflows/pb-update-maven-daemon-0.yml @@ -56,12 +56,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-maven-daemon-1.yml b/.github/workflows/pb-update-maven-daemon-1.yml index f46c18d..97e911b 100644 --- a/.github/workflows/pb-update-maven-daemon-1.yml +++ b/.github/workflows/pb-update-maven-daemon-1.yml @@ -56,12 +56,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 \