From 6ab77f65692b4a9f09f35faac2e383dd2fea2847 Mon Sep 17 00:00:00 2001 From: PenghaiZhang <47203811+PenghaiZhang@users.noreply.github.com> Date: Mon, 2 Dec 2019 11:00:22 +1100 Subject: [PATCH] Update version to 1.0.1 * Fix the issue of failing to launch from directories containing spaces. * Support running the launcher from different directories * Use Git Release tool to publish artifacts to Github --- .travis.yml | 15 +++++++++------ build.gradle | 2 +- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- launcher-scripts/Linux-launcher.sh | 7 ++++--- launcher-scripts/Mac-launcher.sh | 5 +++-- launcher-scripts/Windows-launcher.bat | 5 +++-- 7 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 868f183..98bdae7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,14 +14,17 @@ install: true script: - ./gradlew build -after_success: - - aws s3 --region us-east-1 cp --recursive build/distributions s3://oeq-admin-console-package/`printf %04d $TRAVIS_BUILD_NUMBER`/ before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ -env: - global: - - secure: aY/WM0UPndWHcsHMT6M658Q1bBWYQ635brtMavLZnGRn0FCiB94rUgOo6vn+y3H7BBPBBRk2z0UMaA/VXBV/EcVxrfZx8q9BZg7/jUrlzA/FC01LA1nFCHH4+PGl9GvEd4D6hRMp9UYBbb3sLTucSwtiXIT7mNNC910uRWI+wG/ceIqNz1v4peqhEbDepwN5/7sYqHk9SlWYw9lPwmp3nok0o8Crhv1OTzgeLitWnwXKf4wnzpdcCHI7WJHYtcA0nV09DNJmkJcUdseTT86qztBti5inGXE6/eDV5jj5JXGSHCHiLxG0/a6ZDnDQd3OL8dcqxjzL0JHG9uDROlsgPBy+8SB4nhZj3CdTMfYQr09l4+oN0WmSHIm/CaNGR4hEG7hr5EuHzttFChg84F9i9sJOaVHA6NLjkJYBvydr3Sajn4bRVyZusldwoWsAlo9wJScRdYsepcVo7NQdRO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ESHPv6d6BLR1Ll0sZaX1re4hQBPT12fpdm+7rx1Peb1u/4j56dxiYMkI1qUbvYzxmS6EgBHO4LtXxNEpw9IPknUCecWCl6tRbKgg1Xsppm9/LQMn9Xc64o7GLE+BD+rBy93QnCZJUHNcUZvK+D0TXGfRxffpkYs6ZBtU9PjSv/603a6N6gmrnyi/m9NDBLpbnRtvBIzRj0CupFFdeAe6pfhEdmQ4HbJGPxdb7BOndOc+waAI6ObT+3qCg138h8mbBW12O0pQRm+0XXrTM5aVWqklMKyprPK2q3GeJt1pBrBZcQpXw6MqG9aF95uz7L2cZ9sfVM4eVGR/diLq+9bSgieR3ZEqi/R0QvrgcGe+V5CuT+O3DxzBZbpdlvxB7f3EKEv23nJFwR7d/i54rCi/GNKhIBAt3vItm6dz5tX8PyyPAfNaRos0+wrmLVxwPFWVPPmttu1zNPRvmia8rv7stG94W5/4Z43DVQYjkbLYU6vND9ZoPtqKC82NuMePKcwKKW2w3XKr2JjRmsoulMc= + file_glob: true + file: build/distributions/* + skip_cleanup: true + on: + tags: true \ No newline at end of file diff --git a/build.gradle b/build.gradle index bec80d3..e78dfc8 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ dependencies { } group = 'org.apereo.openequella.adminconsole' -version = artifactVersion +version = System.getenv("TRAVIS_TAG") ?: artifactVersion mainClassName = 'org.apereo.openequella.adminconsole.launcher.ClientLauncher' // Gradlelint is broken: https://github.com/nebula-plugins/gradle-lint-plugin/issues/203 diff --git a/gradle.properties b/gradle.properties index 4a693b4..d215669 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ junitVersion=4.12 -artifactVersion=1.0.0 +artifactVersion=1.0.1 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3114113..4550030 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Mon May 13 17:09:22 AEST 2019 -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/launcher-scripts/Linux-launcher.sh b/launcher-scripts/Linux-launcher.sh index bcf1969..d6090a4 100755 --- a/launcher-scripts/Linux-launcher.sh +++ b/launcher-scripts/Linux-launcher.sh @@ -1,5 +1,6 @@ #!/bin/bash OLD_JAVA_HOME=$JAVA_HOME -export JAVA_HOME=`pwd`/jdk8u212-b03-jre -"$JAVA_HOME/bin/java" -DLAUNCHER_JAVA_PATH="$JAVA_HOME/bin/java" -jar ./libs/admin.jar -export JAVA_HOME=$OLD_JAVA_HOME +SCRIPT_DIRECTORY=`readlink -f "$(dirname "$0")"` +export JAVA_HOME=$SCRIPT_DIRECTORY/jdk8u212-b03-jre +"$JAVA_HOME/bin/java" -DLAUNCHER_JAVA_PATH="$JAVA_HOME/bin/java" -jar "$SCRIPT_DIRECTORY/libs/admin.jar" +export JAVA_HOME=$OLD_JAVA_HOME \ No newline at end of file diff --git a/launcher-scripts/Mac-launcher.sh b/launcher-scripts/Mac-launcher.sh index f4b45e5..188e99a 100755 --- a/launcher-scripts/Mac-launcher.sh +++ b/launcher-scripts/Mac-launcher.sh @@ -1,5 +1,6 @@ #!/bin/bash OLD_JAVA_HOME=$JAVA_HOME -export JAVA_HOME=`pwd`/jdk8u212-b03-jre/Contents/Home -"$JAVA_HOME/bin/java" -DLAUNCHER_JAVA_PATH="$JAVA_HOME/bin/java" -jar ./libs/admin.jar +SCRIPT_DIRECTORY=`readlink -f "$(dirname "$0")"` +export JAVA_HOME=$SCRIPT_DIRECTORY/jdk8u212-b03-jre/Contents/Home +"$JAVA_HOME/bin/java" -DLAUNCHER_JAVA_PATH="$JAVA_HOME/bin/java" -jar "$SCRIPT_DIRECTORY/libs/admin.jar" export JAVA_HOME=$OLD_JAVA_HOME diff --git a/launcher-scripts/Windows-launcher.bat b/launcher-scripts/Windows-launcher.bat index a7d6f1a..5eeecae 100755 --- a/launcher-scripts/Windows-launcher.bat +++ b/launcher-scripts/Windows-launcher.bat @@ -1,6 +1,7 @@ @echo off set OLD_JAVA_HOME=%JAVA_HOME% -set JAVA_HOME=%cd%\jdk8u212-b03-jre -start "Admin console launcher" /D "%cd%\libs" %JAVA_HOME%\bin\javaw -DLAUNCHER_JAVA_PATH="%JAVA_HOME%\bin\java" -jar admin.jar +set BAT_DIRECTORY=%~dp0 +set JAVA_HOME=%BAT_DIRECTORY%jdk8u212-b03-jre +start "Admin console launcher" /D "%BAT_DIRECTORY%\libs" "%JAVA_HOME%\bin\javaw" -DLAUNCHER_JAVA_PATH="%JAVA_HOME%\bin\java" -jar admin.jar set JAVA_HOME=%OLD_JAVA_HOME% set OLD_JAVA_HOME= \ No newline at end of file