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 +