Skip to content

Commit 9bd7945

Browse files
committed
Partial fix for GRAILS-6469 "Codehaus changed root CA to untrusted SmartCom: affects plugin resolution and publishing". Stops publishings zips with the HTTPS url as the download location. Also fixes the issue of leaving zip distribution in trunk by deleting the zip after it has been copied to the tagged branches.
1 parent 1f8bdac commit 9bd7945

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

scripts/ReleasePlugin.groovy

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,24 @@ def publishZipOnlyRelease() {
200200

201201
tagPluginRelease()
202202
modifyOrCreatePluginList()
203+
deleteZipFromTrunk()
203204
println "Successfully published zip-only plugin release."
204205
}
205206

207+
def deleteZipFromTrunk() {
208+
def commitClient = new SVNCommitClient((ISVNAuthenticationManager) authManager, null)
209+
210+
if (!commitMessage) askForMessage()
211+
if(pluginZip) {
212+
def pluginZipFile = new File(pluginZip)
213+
def zipLocation = SVNURL.parseURIDecoded("${remoteLocation}/trunk/${pluginZipFile.name}")
214+
try { commitClient.doDelete([zipLocation] as SVNURL[], commitMessage) }
215+
catch (SVNException e) {
216+
// ok - the zip doesn't exist yet
217+
}
218+
}
219+
}
220+
206221
def updateLocalZipAndXml(File localWorkingCopy) {
207222
ant.copy(file: pluginZip, todir: localWorkingCopy, overwrite:true)
208223
ant.copy(file: "${basedir}/plugin.xml", todir: localWorkingCopy, overwrite:true)
@@ -255,7 +270,7 @@ target(modifyOrCreatePluginList:"Updates the remote plugin.xml descriptor or cre
255270
}
256271
}
257272

258-
def publisher = new DefaultPluginPublisher(remoteRevision, pluginSVN)
273+
def publisher = new DefaultPluginPublisher(remoteRevision, pluginDistURL)
259274
def updatedList = publisher.publishRelease(pluginName, new FileSystemResource(pluginsListFile), !skipLatest)
260275
pluginsListFile.withWriter("UTF-8") { w ->
261276
publisher.writePluginList(updatedList, w)

0 commit comments

Comments
 (0)