Skip to content

Commit 2eeba33

Browse files
authored
Merge pull request #885 from crazywhalecc/dumb_github
switch getting frankenphp version to go mod (bypass rate limits)
2 parents a77e49c + f4b2b9a commit 2eeba33

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,8 @@ protected function buildFrankenphp(): void
268268
logger()->warning('caddy-cbrotli module is enabled, but brotli library is not built. Disabling caddy-cbrotli.');
269269
$xcaddyModules = str_replace('--with github.com/dunglas/caddy-cbrotli', '', $xcaddyModules);
270270
}
271-
$releaseInfo = json_decode(Downloader::curlExec(
272-
'https://api.github.com/repos/php/frankenphp/releases/latest',
273-
hooks: [[CurlHook::class, 'setupGithubToken']],
274-
retries: 3,
275-
), true);
276-
$frankenPhpVersion = $releaseInfo['tag_name'];
271+
[, $out] = shell()->execWithResult('go list -m github.com/dunglas/frankenphp@latest');
272+
$frankenPhpVersion = str_replace('github.com/dunglas/frankenphp v', '', $out[0]);
277273
$libphpVersion = $this->getPHPVersion();
278274
$dynamic_exports = '';
279275
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {

src/globals/test-extensions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
$upx = false;
4444

4545
// whether to test frankenphp build, only available for macos and linux
46-
$frankenphp = false;
46+
$frankenphp = true;
4747

4848
// prefer downloading pre-built packages to speed up the build process
4949
$prefer_pre_built = false;

0 commit comments

Comments
 (0)