@@ -90,14 +90,14 @@ Plug-ins available in the Grails repository are listed below:
9090 def title = " No description available"
9191 if ( plugin. ' @latest-release' ) {
9292 version = plugin. ' @latest-release'
93- pluginLine + = " ${ spacesFormatter[pluginLine.length()..-1]} <${ version} >"
93+ pluginLine + = " ${ spacesFormatter[pluginLine.length()..-1]} <${ version} >\t "
9494 } else if ( plugin. ' release' . size() > 0 ) {
9595 // determine latest release by comparing version names in lexicografic order
9696 version = plugin. ' release' [0 ]. ' @version'
9797 plugin. ' release' . each {
9898 if ( ! " ${ it.'@version'} " . endsWith(" SNAPSHOT" ) && " ${ it.'@version'} " > version ) version = " ${ it.'@version'} "
9999 }
100- pluginLine + = " ${ spacesFormatter[pluginLine.length()..-1]} <${ version} (?)>"
100+ pluginLine + = " ${ spacesFormatter[pluginLine.length()..-1]} <${ version} (?)>\t "
101101 } else {
102102 pluginLine + = " ${ spacesFormatter[pluginLine.length()..-1]} <no releases>"
103103 }
@@ -132,6 +132,7 @@ def buildReleaseInfo = { root, pluginName, releasePath, releaseTag ->
132132 def properties = [' title' ,' author' ,' authorEmail' ,' description' ,' documentation' ]
133133 def releaseDescriptor = parseRemoteXML(" ${ releasePath} /${ releaseTag} /plugin.xml" ). documentElement
134134 def version = releaseDescriptor. ' @version'
135+ if ( releaseTag == ' trunk' && ! (version. endsWith(' SNAPSHOT' ))) return
135136 def releaseContent = new URL (" ${ releasePath} /${ releaseTag} /" ). text
136137 // we don't want to proceed release if zip distribution for this release is not published
137138 if ( releaseContent. indexOf( " grails-${ pluginName} -${ version} .zip" ) < 0 ) return
@@ -155,13 +156,6 @@ def buildPluginInfo = {root, pluginName ->
155156 pluginNode = builder. ' plugin' (name :pluginName)
156157 root. appendChild(pluginNode)
157158 }
158- def latestVersion = null
159- try {
160- latestVersion = parseRemoteXML(" ${ DEFAULT_PLUGIN_DIST} /grails-${ pluginName} /tags/LATEST_RELEASE/plugin.xml" ). documentElement. ' @version'
161- } catch ( Exception e ) {
162- // latest release version is not available
163- }
164- if ( latestVersion ) pluginNode. setAttribute(' latest-release' ,latestVersion as String )
165159
166160 // proceed tagged releases
167161 try {
@@ -180,6 +174,14 @@ def buildPluginInfo = {root, pluginName ->
180174 } catch ( Exception e ) {
181175 // no plugin release info available
182176 }
177+
178+ def latestVersion = null
179+ try {
180+ latestVersion = parseRemoteXML(" ${ DEFAULT_PLUGIN_DIST} /grails-${ pluginName} /tags/LATEST_RELEASE/plugin.xml" ). documentElement. ' @version'
181+ } catch ( Exception e ) {
182+ // latest release version is not available
183+ }
184+ if ( latestVersion && pluginNode. ' release' . find{ it. ' @version' == latestVersion }) pluginNode. setAttribute(' latest-release' ,latestVersion as String )
183185 }
184186}
185187
0 commit comments