add multi update source (Fixes #29)

This commit is contained in:
kmvan
2019-03-13 23:12:05 +08:00
parent 2bce7d66dc
commit 65a90ee238
4 changed files with 34 additions and 21 deletions

View File

@@ -41,16 +41,18 @@ class ConfigGeneration
}
[
'APP_VERSION' => $appVersion,
'APP_NAME' => $appName,
'APP_URL' => $appUrl,
'AUTHOR_URL' => $authorUrl,
'UPDATE_PHP_URL' => $updatePhpUrl,
'AUTHOR_NAME' => $authorName,
'CHANGELOG_URL' => $changelogUrl,
'LATEST_PHP_STABLE_VERSION' => $latestPhpStableVersion,
'APP_VERSION' => $appVersion,
'APP_NAME' => $appName,
'APP_URL' => $appUrl,
'AUTHOR_URL' => $authorUrl,
'UPDATE_PHP_URLS' => $updatePhpUrls,
'AUTHOR_NAME' => $authorName,
'CHANGELOG_URL' => $changelogUrl,
'LATEST_PHP_STABLE_VERSION' => $latestPhpStableVersion,
] = $config;
$updatePhpUrls = \implode("', '", $updatePhpUrls);
$configContent = <<<PHP
<?php
/**
@@ -65,7 +67,7 @@ class ConfigApi
public static \$APP_NAME = '{$appName}';
public static \$APP_URL = '{$appUrl}';
public static \$AUTHOR_URL = '{$authorUrl}';
public static \$UPDATE_PHP_URL = '{$updatePhpUrl}';
public static \$UPDATE_PHP_URLS = ['{$updatePhpUrls}'];
public static \$AUTHOR_NAME = '{$authorName}';
public static \$CHANGELOG_URL = '{$changelogUrl}';
public static \$LATEST_PHP_STABLE_VERSION = '{$latestPhpStableVersion}';