File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1919class VersionUpdateStrategy implements StrategyInterface
2020{
2121
22- const UPDATE_SERVER_URL = 'https://svn-buddy-updater.herokuapp.com ' ;
22+ const RELEASES_URL = 'https://raw.githubusercontent.com/console-helpers/ svn-buddy-updater/master/releases.json ' ;
2323
2424 /**
2525 * Stability.
@@ -94,18 +94,19 @@ public function download(Updater $updater)
9494 public function getCurrentRemoteVersion (Updater $ updater )
9595 {
9696 $ this ->remoteUrl = '' ;
97- $ versions = json_decode (
98- $ this ->downloadFile (self ::UPDATE_SERVER_URL . ' /versions ' ),
97+ $ releases = json_decode (
98+ $ this ->downloadFile (self ::RELEASES_URL ),
9999 true
100100 );
101101
102- if ( !isset ($ versions [$ this ->stability ]) ) {
102+ if ( !isset ($ releases [$ this ->stability ]) ) {
103103 throw new \LogicException ('The " ' . $ this ->stability . '" update channel not found. ' );
104104 }
105105
106- $ this ->remoteUrl = self ::UPDATE_SERVER_URL . $ versions [$ this ->stability ]['path ' ];
106+ $ version = key ($ releases [$ this ->stability ]);
107+ $ this ->remoteUrl = $ releases [$ this ->stability ][$ version ]['phar_download_url ' ];
107108
108- return $ versions [ $ this -> stability ][ ' version ' ] ;
109+ return $ version ;
109110 }
110111
111112 /**
You can’t perform that action at this time.
0 commit comments