Merge pull request #885 from crazywhalecc/dumb_github

switch getting frankenphp version to go mod (bypass rate limits)
This commit is contained in:
Marc 2025-09-04 18:15:40 +02:00 committed by GitHub
commit 2eeba33f94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 7 deletions

View File

@ -268,12 +268,8 @@ abstract class UnixBuilderBase extends BuilderBase
logger()->warning('caddy-cbrotli module is enabled, but brotli library is not built. Disabling caddy-cbrotli.');
$xcaddyModules = str_replace('--with github.com/dunglas/caddy-cbrotli', '', $xcaddyModules);
}
$releaseInfo = json_decode(Downloader::curlExec(
'https://api.github.com/repos/php/frankenphp/releases/latest',
hooks: [[CurlHook::class, 'setupGithubToken']],
retries: 3,
), true);
$frankenPhpVersion = $releaseInfo['tag_name'];
[, $out] = shell()->execWithResult('go list -m github.com/dunglas/frankenphp@latest');
$frankenPhpVersion = str_replace('github.com/dunglas/frankenphp v', '', $out[0]);
$libphpVersion = $this->getPHPVersion();
$dynamic_exports = '';
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {

View File

@ -43,7 +43,7 @@ $no_strip = false;
$upx = false;
// whether to test frankenphp build, only available for macos and linux
$frankenphp = false;
$frankenphp = true;
// prefer downloading pre-built packages to speed up the build process
$prefer_pre_built = false;