From 3e6d81ef1bb08b1c6d0693d3797f731003902f31 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 12 May 2022 09:15:04 +0200 Subject: [PATCH] Use parameter for main jar glob pattern --- dist/win/build.bat | 2 ++ dist/win/build.ps1 | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/win/build.bat b/dist/win/build.bat index b2ec68225..0c6e14cee 100644 --- a/dist/win/build.bat +++ b/dist/win/build.bat @@ -1,6 +1,7 @@ @echo off :: Default values for Cryptomator builds SET APPNAME="Cryptomator" +SET MAIN_JAR_GLOB="cryptomator-*" SET UPGRADE_UUID="bda45523-42b1-4cae-9354-a45475ed4775" SET VENDOR="Skymatic GmbH" SET FIRST_COPYRIGHT_YEAR=2016 @@ -10,6 +11,7 @@ SET HELP_URL="https://cryptomator.org/contact/" powershell -NoLogo -NoExit -ExecutionPolicy Unrestricted -Command .\build.ps1^ -AppName %APPNAME%^ + -MainJarGlob "%MAIN_JAR_GLOB%"^ -UpgradeUUID "%UPGRADE_UUID%"^ -Vendor ""%VENDOR%""^ -CopyrightStartYear %FIRST_COPYRIGHT_YEAR%^ diff --git a/dist/win/build.ps1 b/dist/win/build.ps1 index 23c897ab6..cfbd07244 100644 --- a/dist/win/build.ps1 +++ b/dist/win/build.ps1 @@ -1,6 +1,7 @@ Param( [Parameter(Mandatory, HelpMessage="Please provide a name for the app")][string] $AppName, - [Parameter(Mandatory, HelpMessage="Please provide the windows upgrade uuid for the app")][string] $UpgradeUUID, + [Parameter(Mandatory, HelpMessage="Please provide the glob pattern to identify the main jar")][string] $MainJarGlob, + [Parameter(Mandatory, HelpMessage="Please provide the windows upgrade uuid for the installer")][string] $UpgradeUUID, [Parameter(Mandatory, HelpMessage="Please provide the name of the vendor")][string] $Vendor, [Parameter(Mandatory, HelpMessage="Please provide the starting year for the copyright notice")][int] $CopyrightStartYear, [Parameter(Mandatory, HelpMessage="Please provide a help url")][string] $HelpUrl, @@ -36,7 +37,7 @@ $copyright = "(C) $CopyrightStartYear - $((Get-Date).Year) $Vendor" # compile &mvn -B -f $buildDir/../../pom.xml clean package -DskipTests -Pwin -Copy-Item "$buildDir\..\..\target\cryptomator-*.jar" -Destination "$buildDir\..\..\target\mods" +Copy-Item "$buildDir\..\..\target\$MainJarGlob.jar" -Destination "$buildDir\..\..\target\mods" # add runtime $runtimeImagePath = '.\runtime'