From b4814f5322fc4d1f22a6a7568d5a169a65e616a6 Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Wed, 6 Sep 2023 08:04:44 -0400 Subject: [PATCH] Changes related to OVERRIDE_PACKAGE_VERSION in aarch64 builds (#1520) (#1523) --- 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 ###############################################################################