Permalink
Browse files

fix for WEBSITE-229 "Publishing new plugin releases is broken (plugin…

… page not created on website)"
  • Loading branch information...
1 parent 7987328 commit fa0f75b2d6eab9b7a541d82f547d6e583666ada2 @graemerocher graemerocher committed Nov 29, 2012
@@ -101,6 +101,15 @@ class UrlMappings {
id notEqual: "tag"
}
}
+ "/plugins/$id"(controller: "plugin") {
+ // The PUT is legacy, but can't add it as a separate mapping.
+ action = [ GET: "show", PUT: "apiUpdate" ]
+ parseRequest = true
+
+ constraints {
+ id notEqual: "tag"
+ }
+ }
// "/plugins/tag/"(controller: "plugin", action: "list") // Fix for possible bad path
// "/plugins/filter/"(controller: "plugin", action: "list") // Fix for possible bad path
"/plugins/pending"(controller: "plugin", action: "pendingPlugins")
@@ -56,6 +56,7 @@ class PluginUpdateService implements ApplicationListener<PluginUpdateEvent> {
def plugin = fetchOrCreatePluginInstance(event.name, event.version)
pluginUpdater.updatePlugin(plugin)
pluginService.savePlugin plugin, true
+ pluginUpdater.saveRelease()
if (pluginUpdater.newVersion && !pluginUpdater.snapshot) {
announceRelease plugin
@@ -83,6 +84,7 @@ class PluginUpdateService implements ApplicationListener<PluginUpdateEvent> {
plugin = new Plugin(name: pluginName, currentRelease: version, downloadUrl: "not provided")
pluginService.initNewPlugin(plugin, User.findByLogin("admin"))
+
}
return plugin
@@ -213,7 +215,7 @@ class PluginUpdater {
pom = loadPom()
filename = filename + "." + pom.packaging.text()
- saveRelease()
+
if (!isSnapshot) {
// Only update the plugin portal page with the new info if this
@@ -222,7 +224,7 @@ class PluginUpdater {
}
}
- protected void saveRelease() {
+ void saveRelease() {
// Check whether there are any pending releases. If yes and the most
// recent one failed, we shouldn't add a PluginRelease record.
/*
@@ -69,6 +69,7 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Plugins <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><g:link controller="pluginAdmin" action="list">Plugin List</g:link></li>
+ <li><g:link controller="pendingRelease" action="list">Pending Releases</g:link></li>
<li><g:link controller="pluginPendingApproval" action="list">Approval Queue</g:link></li>
</ul>
</li>
@@ -9,17 +9,14 @@
</head>
<body>
<div class="top"></div>
- <div class="nav">
- <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
- <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
- </div>
+
<div class="body">
<h1><g:message code="default.list.label" args="[entityName]" /></h1>
<g:if test="${flash.message}">
<div class="message">${flash.message}</div>
</g:if>
<div class="list">
- <table>
+ <table class="table table-bordered table-striped">
<thead>
<tr>
@@ -9,18 +9,13 @@
</head>
<body>
<div class="top"></div>
- <div class="nav">
- <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
- <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
- <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
- </div>
<div class="body">
<h1><g:message code="default.show.label" args="[entityName]" /></h1>
<g:if test="${flash.message}">
<div class="message">${flash.message}</div>
</g:if>
<div class="dialog">
- <table>
+ <table class="table table-bordered table-striped">
<tbody>
<tr class="prop">
@@ -29,21 +24,7 @@
<td valign="top" class="value">${fieldValue(bean: pendingReleaseInstance, field: "id")}</td>
</tr>
-
- <tr class="prop">
- <td valign="top" class="name"><g:message code="pendingRelease.zip.label" default="Zip" /></td>
-
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name"><g:message code="pendingRelease.pom.label" default="Pom" /></td>
-
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name"><g:message code="pendingRelease.xml.label" default="Xml" /></td>
-
- </tr>
+
<tr class="prop">
<td valign="top" class="name"><g:message code="pendingRelease.pluginName.label" default="Plugin Name" /></td>
@@ -65,9 +46,9 @@
<div class="buttons">
<g:form>
<g:hiddenField name="id" value="${pendingReleaseInstance?.id}" />
- <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
- <span class="button"><g:actionSubmit class="deploy" action="deploy" value="Deploy" /></span>
- <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
+ <span class="button"><g:actionSubmit class="btn edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
+ <span class="button"><g:actionSubmit class="btn deploy" action="deploy" value="Deploy" /></span>
+ <span class="button"><g:actionSubmit class="btn btn-alert delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
</g:form>
</div>
</div>

0 comments on commit fa0f75b

Please sign in to comment.