mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-29 04:25:23 +00:00
[FIXED JENKINS-45235] When multiple update sites publish different versions, allow those versions to be seen
- When automatically installing dependent plugins, the first update center with a version meeting the minimum required will win - Also enhances the CLI command to allow specification of a minimum version
This commit is contained in:
1 parent
0d1f80ba9f
commit
884e95e0fa
7 files changed
+80
-18
No files matched your search
@@ -641,7 +641,7 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
|
||||
*/
|
||||
public UpdateSite.Plugin getUpdateInfo() {
|
||||
UpdateCenter uc = Jenkins.getInstance().getUpdateCenter();
|
||||
UpdateSite.Plugin p = uc.getPlugin(getShortName());
|
||||
UpdateSite.Plugin p = uc.getPlugin(getShortName(), getVersionNumber());
|
||||
if(p!=null && p.isNewerThan(getVersion())) return p;
|
||||
return null;
|
||||
}
|
||||
@@ -651,6 +651,8 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
|
||||
*/
|
||||
public UpdateSite.Plugin getInfo() {
|
||||
UpdateCenter uc = Jenkins.getInstance().getUpdateCenter();
|
||||
UpdateSite.Plugin p = uc.getPlugin(getShortName(), getVersionNumber());
|
||||
if (p != null) return p;
|
||||
return uc.getPlugin(getShortName());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user