From d2e71b6744d28b6f20c330e706ab6c64ce437ff3 Mon Sep 17 00:00:00 2001 From: sharbuz <87968844+sharbuz@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:01:06 +0300 Subject: [PATCH] hot-fix rda-release script (#2827) --- .buildkite/scripts/dra_release.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.buildkite/scripts/dra_release.sh b/.buildkite/scripts/dra_release.sh index 83a1fa1c0..7cdd05c2b 100755 --- a/.buildkite/scripts/dra_release.sh +++ b/.buildkite/scripts/dra_release.sh @@ -4,7 +4,6 @@ set -euo pipefail source .buildkite/scripts/common.sh -VERSION="$(awk '/const DefaultVersion/{print $NF}' version/version.go | tr -d '"')" FOLDER_PATH="build/distributions" BASE_DIR="${WORKSPACE}/${FOLDER_PATH}" DRA_OUTPUT="release-manager.out" @@ -12,6 +11,8 @@ PROJECT="fleet-server" TYPE=${1} BRANCH="${BUILDKITE_BRANCH}" +VERSION=$(make get-version) + if [[ "${VERSION}" == *"-SNAPSHOT"* || "${VERSION}" == "" ]]; then echo "The 'version' parameter is required and it cannot contain the suffix '-SNAPSHOT'." exit 1 @@ -40,6 +41,6 @@ mkdir -p ${BASE_DIR}/reports ./dev-tools/dependencies-report --csv ${BASE_DIR}/reports/dependencies-${VERSION}.csv cd ${BASE_DIR}/reports && shasum -a 512 dependencies-${VERSION}.csv > dependencies-${VERSION}.csv.sha512 -cd ${BASE_DIR} -echo ${BASE_DIR} -./.buildkite/scripts/release-manager.sh +cd $(dirname ${WORKSPACE}) +./.buildkite/scripts/release-manager.sh #TODO use "echo" for rollback +