From e8a7fabf18b844e2d3cb5e3d81c6c7f2e393d3a9 Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Wed, 4 Oct 2023 10:46:12 +0200 Subject: [PATCH] chore(docker): Use the output of `printSemVersion` as `ORT_VERSION` Previously, the value looked like 3.0.0-SNAPSHOT. Change it to the form like `3.0.0-389da0c-SNAPSHOT`, so that it is possible to figure out from which sources ORT has been built. Signed-off-by: Frank Viernau --- .github/workflows/docker-ort-runtime-ext.yml | 2 +- .github/workflows/docker-ort-runtime.yml | 2 +- scripts/docker_build.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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."