Skip to content

Commit

Permalink
normalize version
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Sep 9, 2024
1 parent 05777e7 commit 737d600
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SelfUpdateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ class SelfUpdateManager
* which isn't available at this point in the Symfony bootstrap.
*/
public function __construct(public string $applicationName, public string $currentVersion, public string $gitHubRepository){
$this->currentVersion = (new VersionParser())->normalize($this->currentVersion);
}

/**
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function isUpToDate(array $options = []): bool {
$latestRelease = $this->getLatestReleaseFromGithub($options);
return NULL === $latestRelease || Comparator::greaterThanOrEqualTo($this->currentVersion, $latestRelease['tag_name']);
return NULL === $latestRelease || Comparator::greaterThanOrEqualTo($this->currentVersion, $latestRelease['version']);
}

/**
Expand Down

0 comments on commit 737d600

Please sign in to comment.