add zip to explicit download plugin

This commit is contained in:
kimchy 2011-05-28 18:47:54 +03:00
parent 3652d57667
commit 4004406c11
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ public class PluginManager {
pluginFile = new File(environment.pluginsFile(), name + ".zip"); pluginFile = new File(environment.pluginsFile(), name + ".zip");
if (version == null) { if (version == null) {
// try with ES version from downloads // try with ES version from downloads
URL pluginUrl = new URL("http://github.com/downloads/" + userName + "/" + repoName + "/" + repoName + "-" + Version.number()); URL pluginUrl = new URL("http://github.com/downloads/" + userName + "/" + repoName + "/" + repoName + "-" + Version.number() + ".zip");
System.out.println("Trying " + pluginUrl.toExternalForm() + "..."); System.out.println("Trying " + pluginUrl.toExternalForm() + "...");
try { try {
downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out)); downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out));
@ -104,7 +104,7 @@ public class PluginManager {
} }
} else { } else {
// download explicit version // download explicit version
URL pluginUrl = new URL("http://github.com/downloads/" + userName + "/" + repoName + "/" + repoName + "-" + version); URL pluginUrl = new URL("http://github.com/downloads/" + userName + "/" + repoName + "/" + repoName + "-" + version + ".zip");
System.out.println("Trying " + pluginUrl.toExternalForm() + "..."); System.out.println("Trying " + pluginUrl.toExternalForm() + "...");
try { try {
downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out)); downloadHelper.download(pluginUrl, pluginFile, new HttpDownloadHelper.VerboseProgress(System.out));