From 594190c4ab9549939d43ffb5e2d0e22cb0e6172a Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 11 Mar 2024 12:39:37 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: SylvainJuge <763082+SylvainJuge@users.noreply.github.com> --- .buildkite/hooks/pre-command | 6 +++--- .ci/release.sh | 2 +- .ci/snapshot.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 6b2dd13..5debc14 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -49,7 +49,7 @@ git config --global user.name "apmmachine" JAVA_VERSION=$(cat .java-version | xargs | tr -dc '[:print:]') JAVA_HOME="${HOME}/.java/openjdk${JAVA_VERSION}" export JAVA_HOME -PATH="${JAVA_HOME}/bin:$PATH" +PATH="${JAVA_HOME}/bin:${PATH}" export PATH # Fallback to install at runtime @@ -59,9 +59,9 @@ if [ ! -d "${JAVA_HOME}" ] ; then echo "--- Install JDK${JAVA_VERSION} :java:" JAVA_URL=https://jvm-catalog.elastic.co/jdk JAVA_PKG="${JAVA_URL}/latest_openjdk_${JAVA_VERSION}_linux.tar.gz" - curl -L --output /tmp/jdk.tar.gz "$JAVA_PKG" + curl -L --output /tmp/jdk.tar.gz "${JAVA_PKG}" mkdir -p "$JAVA_HOME" - tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1 + tar --extract --file /tmp/jdk.tar.gz --directory "${JAVA_HOME}" --strip-components 1 fi java -version \ No newline at end of file diff --git a/.ci/release.sh b/.ci/release.sh index b0eaa1c..7e40208 100755 --- a/.ci/release.sh +++ b/.ci/release.sh @@ -36,5 +36,5 @@ if [[ "$dry_run" == "false" ]] ; then DRY_RUN_MSG="" fi -echo "--- Release the binaries to Maven Central :maven: [./mvnw $GOAL)] $DRY_RUN_MSG" +echo "--- Release the binaries to Maven Central :maven: [./mvnw ${GOAL})] ${DRY_RUN_MSG}" ./mvnw -V -s .ci/settings.xml -Pgpg clean $GOAL -DskipTests --batch-mode | tee release.txt diff --git a/.ci/snapshot.sh b/.ci/snapshot.sh index b60f566..80e4614 100755 --- a/.ci/snapshot.sh +++ b/.ci/snapshot.sh @@ -33,5 +33,5 @@ if [[ "$dry_run" == "false" ]] ; then DRY_RUN_MSG="" fi -echo "--- Deploy the snapshot :package: [./mvnw $GOAL)] $DRY_RUN_MSG" -./mvnw -V -s .ci/settings.xml -Pgpg clean $GOAL -DskipTests --batch-mode | tee snapshot.txt +echo "--- Deploy the snapshot :package: [./mvnw ${GOAL})] ${DRY_RUN_MSG}" +./mvnw -V -s .ci/settings.xml -Pgpg clean ${GOAL} -DskipTests --batch-mode | tee snapshot.txt