Also allow "main" as branch for github assets

When setting
$myUpdateChecker->setBranch('main');
the setting enableReleaseAssets was ignored. But since on newer versions "main" is the default (and not "master"), it should allow it.
This commit is contained in:
Franky Van Liedekerke 2023-01-01 22:34:49 +01:00 committed by GitHub
parent 2fb701089d
commit 75c05617ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ if ( !class_exists(GitHubApi::class, false) ):
protected function getUpdateDetectionStrategies($configBranch) {
$strategies = array();
if ( $configBranch === 'master' ) {
if ( $configBranch === 'master' || $configBranch === 'main') {
//Use the latest release.
$strategies[self::STRATEGY_LATEST_RELEASE] = array($this, 'getLatestRelease');
//Failing that, use the tag with the highest version number.