From c8f22324773fd07b460afcc0307d63db5a210c20 Mon Sep 17 00:00:00 2001 From: stanbrub Date: Fri, 11 Oct 2024 14:12:15 -0600 Subject: [PATCH 1/3] Replace the snapshot name with the release before building --- .github/scripts/make-release-distro.sh | 11 +++++------ .github/workflows/publish-benchmarks.yml | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/scripts/make-release-distro.sh b/.github/scripts/make-release-distro.sh index c7188aa..fc309b6 100755 --- a/.github/scripts/make-release-distro.sh +++ b/.github/scripts/make-release-distro.sh @@ -7,8 +7,7 @@ set -o nounset # Copyright (c) 2024-2024 Deephaven Data Labs and Patent Pending # Create a tar file with the given version using the git project located in the -# working directory. Also, make a release-notes.md files compared between the given -# release commit and previous version +# working directory. if [[ $# != 2 ]]; then echo "$0: Missing release version or distro source argument" @@ -24,18 +23,18 @@ WORKING_DIR=$(pwd) # Generate dependencies directory mkdir -p ${DISTRO_DEST}/libs/ cd ${DISTRO_DEST} -cp ${DISTRO_SOURCE}/dependency-pom.xml . +cat ${DISTRO_SOURCE}/dependency-pom.xml | sed -i "s!1.0-SNAPSHOT!${RELEASE_VERSION}!g" > dependency-pom.xml mvn -B install --file dependency-pom.xml mv target/dependencies/* libs/ rm -rf target -rm libs/deephaven-benchmark-*SNAPSHOT*.jar +rm libs/${ARTIFACT}*.jar cd ${WORKING_DIR} # Build the Distro for running standard benchmarks cp ${DISTRO_SOURCE}/* ${DISTRO_DEST} rm ${DISTRO_DEST}/dependency-pom.xml -cp target/deephaven-benchmark-1.0-SNAPSHOT.jar ${DISTRO_DEST}/libs/${ARTIFACT}.jar -cp target/deephaven-benchmark-1.0-SNAPSHOT-tests.jar ${DISTRO_DEST}/libs/${ARTIFACT}-tests.jar +cp target/${ARTIFACT}.jar ${DISTRO_DEST}/libs/ +cp target/${ARTIFACT}-tests.jar ${DISTRO_DEST}/libs/ echo "VERSION=${RELEASE_VERSION}" > ${DISTRO_DEST}/.env cd ${DISTRO_DEST} diff --git a/.github/workflows/publish-benchmarks.yml b/.github/workflows/publish-benchmarks.yml index 9a360c6..4a6b3ba 100644 --- a/.github/workflows/publish-benchmarks.yml +++ b/.github/workflows/publish-benchmarks.yml @@ -77,8 +77,9 @@ jobs: - name: Build and Install Release Artifacts Locally working-directory: ${{env.RELEASE_DIR}} run: | + sed -i "s!1.0-SNAPSHOT!${VERSION}!" pom.xml mvn -B install --file pom.xml - docker compose down + docker compose down - name: Build Release Distribution working-directory: ${{env.RELEASE_DIR}} From 39e464adc12ad55b25505bc3d0a006c8324b50ca Mon Sep 17 00:00:00 2001 From: stanbrub Date: Fri, 11 Oct 2024 14:20:31 -0600 Subject: [PATCH 2/3] Removed -i from sed --- .github/scripts/make-release-distro.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/make-release-distro.sh b/.github/scripts/make-release-distro.sh index fc309b6..13ddd71 100755 --- a/.github/scripts/make-release-distro.sh +++ b/.github/scripts/make-release-distro.sh @@ -23,7 +23,7 @@ WORKING_DIR=$(pwd) # Generate dependencies directory mkdir -p ${DISTRO_DEST}/libs/ cd ${DISTRO_DEST} -cat ${DISTRO_SOURCE}/dependency-pom.xml | sed -i "s!1.0-SNAPSHOT!${RELEASE_VERSION}!g" > dependency-pom.xml +cat ${DISTRO_SOURCE}/dependency-pom.xml | sed "s!1.0-SNAPSHOT!${RELEASE_VERSION}!g" > dependency-pom.xml mvn -B install --file dependency-pom.xml mv target/dependencies/* libs/ rm -rf target From dc599dd1ccaaa69e18407ee93925af6a17295411 Mon Sep 17 00:00:00 2001 From: stanbrub Date: Fri, 11 Oct 2024 15:19:52 -0600 Subject: [PATCH 3/3] Fixed some path and version issues --- .github/scripts/make-release-distro.sh | 4 ++-- .github/workflows/publish-benchmarks.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/make-release-distro.sh b/.github/scripts/make-release-distro.sh index 13ddd71..8dc5e36 100755 --- a/.github/scripts/make-release-distro.sh +++ b/.github/scripts/make-release-distro.sh @@ -15,10 +15,10 @@ if [[ $# != 2 ]]; then fi RELEASE_VERSION=$1 -DISTRO_SOURCE=$2 +DISTRO_SOURCE=$(echo $(cd $(dirname "$2"); pwd)/$(basename "$2")) ARTIFACT=deephaven-benchmark-${RELEASE_VERSION} -DISTRO_DEST=target/distro WORKING_DIR=$(pwd) +DISTRO_DEST=${WORKING_DIR}/target/distro # Generate dependencies directory mkdir -p ${DISTRO_DEST}/libs/ diff --git a/.github/workflows/publish-benchmarks.yml b/.github/workflows/publish-benchmarks.yml index 4a6b3ba..c95e51c 100644 --- a/.github/workflows/publish-benchmarks.yml +++ b/.github/workflows/publish-benchmarks.yml @@ -77,7 +77,7 @@ jobs: - name: Build and Install Release Artifacts Locally working-directory: ${{env.RELEASE_DIR}} run: | - sed -i "s!1.0-SNAPSHOT!${VERSION}!" pom.xml + sed -i "s;1.0-SNAPSHOT;${VERSION};" pom.xml mvn -B install --file pom.xml docker compose down