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 19
19
class VersionUpdateStrategy implements StrategyInterface
20
20
{
21
21
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 ' ;
23
23
24
24
/**
25
25
* Stability.
@@ -94,18 +94,19 @@ public function download(Updater $updater)
94
94
public function getCurrentRemoteVersion (Updater $ updater )
95
95
{
96
96
$ this ->remoteUrl = '' ;
97
- $ versions = json_decode (
98
- $ this ->downloadFile (self ::UPDATE_SERVER_URL . ' /versions ' ),
97
+ $ releases = json_decode (
98
+ $ this ->downloadFile (self ::RELEASES_URL ),
99
99
true
100
100
);
101
101
102
- if ( !isset ($ versions [$ this ->stability ]) ) {
102
+ if ( !isset ($ releases [$ this ->stability ]) ) {
103
103
throw new \LogicException ('The " ' . $ this ->stability . '" update channel not found. ' );
104
104
}
105
105
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 ' ];
107
108
108
- return $ versions [ $ this -> stability ][ ' version ' ] ;
109
+ return $ version ;
109
110
}
110
111
111
112
/**
You can’t perform that action at this time.
0 commit comments