From 748445ec861401dc4b2fe690f61b0f1ab49c84ab Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Fri, 1 Sep 2023 14:08:11 -0400 Subject: [PATCH] Changes related to OVERRIDE_PACKAGE_VERSION in aarch64 builds (#1520) --- aarch64_linux/aarch64_ci_build.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/aarch64_linux/aarch64_ci_build.sh b/aarch64_linux/aarch64_ci_build.sh index c374359c2..321287ff5 100644 --- a/aarch64_linux/aarch64_ci_build.sh +++ b/aarch64_linux/aarch64_ci_build.sh @@ -4,6 +4,19 @@ set -eux -o pipefail SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" source $SCRIPTPATH/aarch64_ci_setup.sh +tagged_version() { + GIT_DESCRIBE="git --git-dir /pytorch/.git describe --tags --match v[0-9]*.[0-9]*.[0-9]*" + if ${GIT_DESCRIBE} --exact >/dev/null; then + ${GIT_DESCRIBE} + else + return 1 + fi +} + +if tagged_version >/dev/null; then + export OVERRIDE_PACKAGE_VERSION="$(tagged_version | sed -e 's/^v//' -e 's/-.*$//')" +fi + ############################################################################### # Run aarch64 builder python ###############################################################################