diff --git a/.github/workflows/docker-ort-runtime-ext.yml b/.github/workflows/docker-ort-runtime-ext.yml index b490b8d4fa7b0..1f28779be51da 100644 --- a/.github/workflows/docker-ort-runtime-ext.yml +++ b/.github/workflows/docker-ort-runtime-ext.yml @@ -169,7 +169,7 @@ jobs: - name: Get ORT current version run: | - ORT_VERSION=$(./gradlew -q properties --property version | sed -nr "s/version: (.+)/\1/p") + ORT_VERSION=$(./gradlew -q printSemVersion) echo "ORT_VERSION=${ORT_VERSION}" >> $GITHUB_ENV - name: Set up Docker build diff --git a/.github/workflows/docker-ort-runtime.yml b/.github/workflows/docker-ort-runtime.yml index 625cdbee4bea3..52b5ffd833be5 100644 --- a/.github/workflows/docker-ort-runtime.yml +++ b/.github/workflows/docker-ort-runtime.yml @@ -182,7 +182,7 @@ jobs: - name: Get ORT current version run: | - ORT_VERSION=$(./gradlew -q properties --property version | sed -nr "s/version: (.+)/\1/p") + ORT_VERSION=$(./gradlew -q printSemVersion) echo "ORT_VERSION=${ORT_VERSION}" >> $GITHUB_ENV - name: Set up Docker build diff --git a/scripts/docker_build.sh b/scripts/docker_build.sh index 18f8ea9dd89f4..d99bc3f6f3b25 100755 --- a/scripts/docker_build.sh +++ b/scripts/docker_build.sh @@ -20,7 +20,7 @@ set -e -o pipefail GIT_ROOT=$(git rev-parse --show-toplevel) -ORT_VERSION=$("$GIT_ROOT/gradlew" -q properties --property version | sed -nr "s/version: (.+)/\1/p") +ORT_VERSION=$("$GIT_ROOT/gradlew" -q printSemVersion) DOCKER_IMAGE_ROOT="${DOCKER_IMAGE_ROOT:-ghcr.io/oss-review-toolkit}" echo "Setting ORT_VERSION to $ORT_VERSION."