diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 286ffa6..38f8f7f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,8 +33,13 @@ jobs: - name: Display Maven version run: mvn -version - - name: Build + - name: Build (Unix) + if: matrix.os != 'windows-latest' run: mvn install -DskipTests=true -Dgpg.skip -B -V + + - name: Build (Windows) + if: matrix.os == 'windows-latest' + run: mvn --% install -DskipTests=true -Dgpg.skip -B -V # tell powershell to stop parsing with --% so it doesn't error with "Unknown lifecycle phase .skip" - name: Install Spice (https://install.spiceai.org) (Linux) if: matrix.os == 'ubuntu-latest' diff --git a/src/main/java/ai/spice/Config.java b/src/main/java/ai/spice/Config.java index 2a04a52..8ea758d 100644 --- a/src/main/java/ai/spice/Config.java +++ b/src/main/java/ai/spice/Config.java @@ -108,7 +108,13 @@ public static String getUserAgent() { osArch = "i386"; } - return "spice-java " + Version.SPICE_JAVA_VERSION + " (" + System.getProperty("os.name") + "/" + // change the os name to match the pattern set in other SDKs + String osName = System.getProperty("os.name"); + if (osName.equals("Mac OS X")) { + osName = "Darwin"; + } + + return "spice-java " + Version.SPICE_JAVA_VERSION + " (" + osName + "/" + System.getProperty("os.version") + " " + osArch + ")"; }