1
0
Fork 0
mirror of synced 2024-09-28 23:41:23 +12:00

Merge branch '1.5.x' into feat-runtime-controls-1.5.x

This commit is contained in:
Bradley Schofield 2024-08-06 18:57:55 +09:00
commit 9da682ec48
3 changed files with 24 additions and 10 deletions

View file

@ -69,7 +69,7 @@
"utopia-php/storage": "0.18.*",
"utopia-php/swoole": "0.8.*",
"utopia-php/system": "0.8.*",
"utopia-php/vcs": "0.6.*",
"utopia-php/vcs": "0.8.*",
"utopia-php/websocket": "0.1.*",
"matomo/device-detector": "6.1.*",
"dragonmantank/cron-expression": "3.3.2",

14
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "7a9af1063aac524865d2479ce3957d0e",
"content-hash": "b5c0db330bf30bd1d240b96116d96baf",
"packages": [
{
"name": "adhocore/jwt",
@ -2758,16 +2758,16 @@
},
{
"name": "utopia-php/vcs",
"version": "0.6.7",
"version": "0.8.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/vcs.git",
"reference": "8d8ff1ac68e991b95adb6f91fcde8f9bb8f24974"
"reference": "3084aa93d24ed1e70f01e75f4318fc0d07f12596"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/vcs/zipball/8d8ff1ac68e991b95adb6f91fcde8f9bb8f24974",
"reference": "8d8ff1ac68e991b95adb6f91fcde8f9bb8f24974",
"url": "https://api.github.com/repos/utopia-php/vcs/zipball/3084aa93d24ed1e70f01e75f4318fc0d07f12596",
"reference": "3084aa93d24ed1e70f01e75f4318fc0d07f12596",
"shasum": ""
},
"require": {
@ -2801,9 +2801,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/vcs/issues",
"source": "https://github.com/utopia-php/vcs/tree/0.6.7"
"source": "https://github.com/utopia-php/vcs/tree/0.8.1"
},
"time": "2024-06-05T17:38:29+00:00"
"time": "2024-07-29T20:49:09+00:00"
},
{
"name": "utopia-php/websocket",

View file

@ -218,7 +218,15 @@ class Builds extends Action
$branchName = $deployment->getAttribute('providerBranch');
$commitHash = $deployment->getAttribute('providerCommitHash', '');
$gitCloneCommand = $github->generateCloneCommand($cloneOwner, $cloneRepository, $branchName, $tmpDirectory, $rootDirectory, $commitHash);
$cloneVersion = $branchName;
$cloneType = GitHub::CLONE_TYPE_BRANCH;
if(!empty($commitHash)) {
$cloneVersion = $commitHash;
$cloneType = GitHub::CLONE_TYPE_COMMIT;
}
$gitCloneCommand = $github->generateCloneCommand($cloneOwner, $cloneRepository, $cloneVersion, $cloneType, $tmpDirectory, $rootDirectory);
$stdout = '';
$stderr = '';
Console::execute('mkdir -p /tmp/builds/' . \escapeshellcmd($buildId), '', $stdout, $stderr);
@ -241,7 +249,13 @@ class Builds extends Action
if (!empty($templateRepositoryName) && !empty($templateOwnerName) && !empty($templateBranch)) {
// Clone template repo
$tmpTemplateDirectory = '/tmp/builds/' . \escapeshellcmd($buildId) . '/template';
$gitCloneCommandForTemplate = $github->generateCloneCommand($templateOwnerName, $templateRepositoryName, $templateBranch, $tmpTemplateDirectory, $templateRootDirectory);
$cloneType = GitHub::CLONE_TYPE_BRANCH;
if(\str_starts_with($templateBranch, '0.1.')) { // Temporary fix for 1.5. In future versions this only support tag names
$cloneType = GitHub::CLONE_TYPE_TAG;
}
$gitCloneCommandForTemplate = $github->generateCloneCommand($templateOwnerName, $templateRepositoryName, $templateBranch, $cloneType, $tmpTemplateDirectory, $templateRootDirectory);
$exit = Console::execute($gitCloneCommandForTemplate, '', $stdout, $stderr);
if ($exit !== 0) {