Permalink
Browse files

fixed issue updating default plugin versions with the upgrade command

  • Loading branch information...
1 parent af16eb5 commit 3523178a4ab8166a8f115000144d0f4ef1d70234 @graemerocher graemerocher committed Oct 19, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 scripts/Upgrade.groovy
View
10 scripts/Upgrade.groovy
@@ -192,7 +192,15 @@ move it to the new location of '${basedir}/test/integration'. Please move the di
}
// Add the app name and Grails version to the metadata.
- updateMetadata(metadata, ["app.name": "$grailsAppName", "app.grails.version": "$grailsVersion"])
+ def newMetadata = ["app.name": "$grailsAppName", "app.grails.version": "$grailsVersion"]
+ for(pluginEntry in grailsSettings.defaultPluginMap) {
+ def pluginName = pluginEntry.key
+ def pluginKey = "plugins.$pluginName".toString()
+ if(metadata.containsKey(pluginKey)) {
+ newMetadata[pluginKey] = pluginEntry.value
+ }
+ }
+ updateMetadata(metadata, newMetadata)
// proceed plugin-specific upgrade logic contained in 'scripts/_Upgrade.groovy' under plugin's root
def plugins = pluginSettings.pluginBaseDirectories

0 comments on commit 3523178

Please sign in to comment.