Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 55e6e6c

Browse files
committed
minor fixes to auto uploader
1 parent 6aec59d commit 55e6e6c

File tree

8 files changed

+19
-17
lines changed

8 files changed

+19
-17
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ ClassySharkWS/out/
3434
*.txt
3535

3636
ClassySharkWS/*_dump
37+
38+
ClassySharkWS/ClassyShark*.jar

ClassySharkWS/src/com/google/classyshark/Version.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
package com.google.classyshark;
1818

1919
/**
20-
* This file is the one containg the data for the current ClassyShark version
20+
* This file is the one containing the data for the current ClassyShark version
2121
*/
2222
public class Version {
2323

24-
public static final int MAJOR = 1;
25-
public static final int MINOR = 0;
24+
public static final int MAJOR = 6;
25+
public static final int MINOR = 4;
2626
}

ClassySharkWS/src/com/google/classyshark/gui/panel/displayarea/doodles/SharkBG.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package com.google.classyshark.gui.panel.displayarea.doodles;
1818

19+
import com.google.classyshark.Version;
20+
1921
/**
2022
* the welcome ascii art image
2123
*/
@@ -46,6 +48,7 @@ class SharkBG {
4648
+ " ii! '*YMWM, \n"
4749
+ " I' \"YM\n"
4850
+ "\n\n\n\thttp://www.retrojunkie.com/asciiart/animals/sharks.htm"
49-
+ "\n\n\n\tClassyShark ver. 6.4 powered by SilverGhost";
51+
+ "\n\n\n\tClassyShark ver." + Version.MAJOR + "."
52+
+ Version.MINOR + " powered by SilverGhost";
5053

5154
}

ClassySharkWS/src/com/google/classyshark/updater/UpdateManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828

2929

3030
/**
31-
* This class is the core point for the update process: based on the response received from GitHub, it will download
32-
* the new release and, if ClassyShark has been started as desktop app, when the download finishes, it will show a
31+
* This class is the core point for the update process: based on the response
32+
* received from GitHub, it will download the new release and, if ClassyShark
33+
* has been started as desktop app, when the download finishes, it will show a
3334
* dialog containing the changelog of the new version
3435
*/
3536
public class UpdateManager{
@@ -65,7 +66,7 @@ private void checkVersion(boolean isGui) {
6566
call.enqueue(releaseCallback);
6667
}
6768

68-
private void onReleaseResponse(Release release) {
69+
private void onReleaseResponse(final Release release) {
6970
if (release.isNewerThan(currentRelease)) {
7071
new Thread(new Runnable() {
7172
@Override
@@ -85,5 +86,4 @@ private void obtainNew(Release release) {
8586
System.err.println("ERROR: " + e.getMessage());
8687
}
8788
}
88-
8989
}

ClassySharkWS/src/com/google/classyshark/updater/models/Release.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.classyshark.updater.models;
1818

19-
2019
import com.google.classyshark.Version;
2120
import com.google.classyshark.updater.networking.GitHubApi;
2221
import com.google.gson.annotations.SerializedName;
@@ -37,8 +36,7 @@ public class Release {
3736
private final ReleaseDownloadData[] assets;
3837
@SerializedName("created_at")
3938
private final String createdAt;
40-
41-
39+
4240
private Release(String name, boolean preRelease, String body, ReleaseDownloadData[] assets, String createdAt) {
4341
this.name = name;
4442
this.preRelease = preRelease;

ClassySharkWS/src/com/google/classyshark/updater/networking/GitHubApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import retrofit2.http.GET;
2323

2424
/**
25-
* This class is the one taking care of representing the API needed in order to retrieve the latest release data from
26-
* GitHub.
25+
* This class is the one taking care of representing the API needed
26+
* in order to retrieve the latest release data from GitHub.
2727
*/
2828
public interface GitHubApi {
2929

ClassySharkWS/src/com/google/classyshark/updater/networking/MessageRunnable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
public class MessageRunnable implements Runnable {
2222
private final String title;
2323
private final String changelog;
24-
private final boolean gui;
24+
private final boolean isGui;
2525

2626
private final String ICON_PATH = "/resources/ic_update.png";
2727

2828
public MessageRunnable(String title, String changelog, boolean gui) {
2929
this.title = buildTitleFrom(title);
3030
this.changelog = buildChangelogFrom(changelog);
31-
this.gui = gui;
31+
this.isGui = gui;
3232
}
3333

3434
private String buildTitleFrom(String title) {
@@ -41,7 +41,7 @@ private String buildChangelogFrom(String changelog) {
4141

4242
@Override
4343
public void run() {
44-
if (gui) {
44+
if (isGui) {
4545
warnUserAboutNewRelease();
4646
}
4747
}

ClassySharkWS/src/com/google/classyshark/updater/utils/NamingUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.classyshark.updater.utils;
1818

19-
2019
import com.google.classyshark.updater.models.Release;
2120
import com.sun.istack.internal.NotNull;
2221

0 commit comments

Comments
 (0)