Skip to content

Commit e9b7dec

Browse files
author
graeme
committed
fixed problem with not adding plugin zip when status was UNKNOWN or NONE
git-svn-id: https://svn.codehaus.org/grails/trunk@4546 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d
1 parent 8af231d commit e9b7dec

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

scripts/ReleasePlugin.groovy

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ grailsHome = Ant.project.properties."environment.GRAILS_HOME"
1313
includeTargets << new File ( "${grailsHome}/scripts/Init.groovy" )
1414
includeTargets << new File ( "${grailsHome}/scripts/PackagePlugin.groovy" )
1515

16-
pluginSVN = "https://svn.codehaus.org/grails-plugins"
17-
//pluginSVN = "file:///Developer/localsvn"
16+
//pluginSVN = "https://svn.codehaus.org/grails-plugins"
17+
pluginSVN = "file:///Developer/localsvn"
1818
authManager = null
1919
message = null
2020
trunk = null
@@ -37,7 +37,8 @@ task(processAuth:"Prompts user for login details to create authentication manage
3737
}
3838
}
3939
task(releasePlugin: "The implementation task") {
40-
depends(packagePlugin, processAuth)
40+
depends(packagePlugin)
41+
//depends(packagePlugin, processAuth)
4142

4243
remoteLocation = "${pluginSVN}/grails-${pluginName}"
4344
trunk = SVNURL.parseURIDecoded("${remoteLocation}/trunk")
@@ -78,20 +79,26 @@ task(checkInPluginZip:"Checks in the plug-in zip if it has not been checked in a
7879
def statusClient = new SVNStatusClient((ISVNAuthenticationManager)authManager,null)
7980
def wcClient = new SVNWCClient((ISVNAuthenticationManager)authManager,null)
8081
def pluginFile = new File(pluginZip)
82+
def addPluginFile = false
8183
try {
82-
statusClient.doStatus(pluginFile, true)
84+
def status = statusClient.doStatus(pluginFile, true)
85+
if(status.kind == SVNNodeKind.NONE || status.kind == SVNNodeKind.UNKNOWN) addPluginFile = true
8386
}
8487
catch(SVNException) {
85-
// not checked in add and commit
86-
wcClient.doAdd(pluginFile,true,false,false,false)
87-
}
88-
def pluginXml = new File("${basedir}/plugin.xml")
88+
// not checked in add and commit
89+
addPluginFile = true
90+
}
91+
if(addPluginFile) wcClient.doAdd(pluginFile,true,false,false,false)
92+
def pluginXml = new File("${basedir}/plugin.xml")
93+
addPluginFile = false
8994
try {
90-
statusClient.doStatus(pluginXml, true)
95+
def status = statusClient.doStatus(pluginXml, true)
96+
if(status.kind == SVNNodeKind.NONE || status.kind == SVNNodeKind.UNKNOWN) addPluginFile = true
9197
}
9298
catch(SVNException e) {
93-
wcClient.doAdd(pluginXml, true, false,false,false)
94-
}
99+
addPluginFile = true
100+
}
101+
if(addPluginFile) wcClient.doAdd(pluginXml, true, false,false,false)
95102
}
96103
task(updateAndCommitLatest:"Commits the latest revision of the Plug-in") {
97104
def result = confirmInput("""

0 commit comments

Comments
 (0)