Skip to content

Commit 9112ded

Browse files
Remove version hardcoding from loggingTesting.yml (#869)
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent 8a69bc6 commit 9112ded

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/loggingTesting.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ jobs:
4545
- name: Build JDBC driver
4646
run: mvn clean package -DskipTests
4747

48+
- name: Find JAR file
49+
shell: bash
50+
run: |
51+
# Find the main JAR file dynamically
52+
MAIN_JAR=$(find target -name "databricks-jdbc-*-oss.jar" -not -name "*-thin.jar" | head -1)
53+
if [ -z "$MAIN_JAR" ]; then
54+
echo "ERROR: Could not find main JAR file in target directory"
55+
ls -la target/
56+
exit 1
57+
fi
58+
echo "Using JAR file: $MAIN_JAR"
59+
echo "MAIN_JAR=$MAIN_JAR" >> $GITHUB_ENV
60+
4861
- name: Set Environment Variables
4962
if: runner.os != 'Windows'
5063
shell: bash
@@ -79,8 +92,10 @@ jobs:
7992
rm -rf target/test-classes
8093
mkdir -p target/test-classes
8194
95+
echo "Using JAR file: $MAIN_JAR"
96+
8297
javac \
83-
-cp "target/databricks-jdbc-1.0.7-oss.jar" \
98+
-cp "$MAIN_JAR" \
8499
-d target/test-classes \
85100
src/test/java/com/databricks/client/jdbc/LoggingTest.java
86101
@@ -94,7 +109,9 @@ jobs:
94109
OS_TYPE=$(uname | tr '[:upper:]' '[:lower:]')
95110
if [[ "$OS_TYPE" == "linux" ]]; then SEP=":"; else SEP=";"; fi
96111
echo "Using classpath separator: '$SEP'"
97-
CP="target/test-classes${SEP}target/databricks-jdbc-1.0.7-oss.jar"
112+
echo "Using JAR file: $MAIN_JAR"
113+
114+
CP="target/test-classes${SEP}$MAIN_JAR"
98115
99116
java \
100117
--add-opens=java.base/java.nio=ALL-UNNAMED \

0 commit comments

Comments
 (0)