Skip to content

Commit

Permalink
определение и скачивание последней версии
Browse files Browse the repository at this point in the history
  • Loading branch information
YanSergey committed Aug 23, 2022
1 parent 122c258 commit e842303
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ public void run() {
/** Узнать последнюю версию из релизов GitHub. */
public void readUpstreamVersion() {

// final URL url = new URL("https://api.github.com/repos/YanSergey/OneS_ClusterAdmin/tags");
URL url;
HttpURLConnection conn;
try {
Expand Down Expand Up @@ -335,9 +334,7 @@ public void readUpstreamVersion() {
break;
}
}
// currentVersion.compareTo(Version.parse(lastTagName)) = 1
// return Version.parse(lastTagName);
latestVersion = Version.parse("0.4.0"); // TODO del
latestVersion = Version.parse(lastTagName);
}

/**
Expand Down Expand Up @@ -379,11 +376,9 @@ private String selectFileToSave(Shell parentShell) {
}

private boolean downloadReleaseToFile(String fname) {
// String link = downloadLatestVersionUrl;
String link = "https://speedtest.selectel.ru/10MB"; // TODO это для теста, удалить!

try {
Request.Get(link).execute().saveContent(new File(fname));
Request.Get(latestVersionUrl).execute().saveContent(new File(fname));
} catch (IOException e) {
e.printStackTrace();
return false;
Expand Down

0 comments on commit e842303

Please sign in to comment.