Fixed upstream revision check.
This commit is contained in:
parent
40a807c6af
commit
94ac8b1460
@ -1,16 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="GUI" type="Application" factoryName="Application" show_console_on_std_err="true">
|
|
||||||
<option name="MAIN_CLASS_NAME" value="com.lyndir.masterpassword.gui.GUI" />
|
|
||||||
<option name="VM_PARAMETERS" value="" />
|
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH" />
|
|
||||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
|
||||||
<option name="ENV_VARIABLES" />
|
|
||||||
<option name="PASS_PARENT_ENVS" value="true" />
|
|
||||||
<module name="masterpassword-gui" />
|
|
||||||
<envs />
|
|
||||||
<method />
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
@ -71,14 +71,14 @@ public class GUI implements UnlockFrame.SignInCallback {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
String manifestRevision = attributes.getValue( Attributes.Name.IMPLEMENTATION_VERSION );
|
String manifestRevision = attributes.getValue( Attributes.Name.IMPLEMENTATION_VERSION );
|
||||||
String upstreamRevisionURL = "http://masterpasswordapp.com/masterpassword-gui.jar.rev";
|
String upstreamRevisionURL = "https://masterpasswordapp.com/masterpassword-gui.jar.rev";
|
||||||
CharSource upstream = Resources.asCharSource( URI.create( upstreamRevisionURL ).toURL(), Charsets.UTF_8 );
|
CharSource upstream = Resources.asCharSource( URI.create( upstreamRevisionURL ).toURL(), Charsets.UTF_8 );
|
||||||
String upstreamRevision = upstream.readFirstLine();
|
String upstreamRevision = upstream.readFirstLine();
|
||||||
|
if ((manifestRevision != null) && (upstreamRevision != null) && !manifestRevision.equalsIgnoreCase( upstreamRevision )) {
|
||||||
logger.inf( "Local Revision: <%s>", manifestRevision );
|
logger.inf( "Local Revision: <%s>", manifestRevision );
|
||||||
logger.inf( "Upstream Revision: <%s>", upstreamRevision );
|
logger.inf( "Upstream Revision: <%s>", upstreamRevision );
|
||||||
if ((manifestRevision != null) && !manifestRevision.equalsIgnoreCase( upstreamRevision )) {
|
|
||||||
logger.wrn( "You are not running the current official version. Please update from:\n"
|
logger.wrn( "You are not running the current official version. Please update from:\n"
|
||||||
+ "http://masterpasswordapp.com/masterpassword-gui.jar" );
|
+ "https://masterpasswordapp.com/masterpassword-gui.jar" );
|
||||||
JOptionPane.showMessageDialog( null, "A new version of Master Password is available.\n"
|
JOptionPane.showMessageDialog( null, "A new version of Master Password is available.\n"
|
||||||
+ "Please download the latest version from http://masterpasswordapp.com",
|
+ "Please download the latest version from http://masterpasswordapp.com",
|
||||||
"Update Available", JOptionPane.WARNING_MESSAGE );
|
"Update Available", JOptionPane.WARNING_MESSAGE );
|
||||||
|
Loading…
Reference in New Issue
Block a user