Update Gradle generation of latest version script
@@ -44,7 +44,7 @@ build {
def shellScriptTemplateFile = new File("${projectDir}/src/main/resources/hub-detect-sh")
def shellScriptContents = shellScriptTemplateFile.getText('UTF-8')
if (!version.contains('SNAPSHOT')) {
- shellScriptContents = shellScriptContents.replaceFirst("DETECT_LATEST_RELEASE_VERSION=\\S*\n", "DETECT_LATEST_RELEASE_VERSION=\"${version}\"\n")
+ shellScriptContents = shellScriptContents.replaceFirst("DETECT_LATEST_RELEASE_VERSION=\\S*\n", 'DETECT_LATEST_RELEASE_VERSION=${DETECT_LATEST_RELEASE_VERSION:-' + "${version}" + '}\n')
shellScriptTemplateFile.delete()
shellScriptTemplateFile << shellScriptContents
}
