Skip to content

Commit 8dd38b3

Browse files
committed
Changed update server url
1 parent 7b85218 commit 8dd38b3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/SVNBuddy/Updater/VersionUpdateStrategy.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class 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
/**

0 commit comments

Comments
 (0)