Upgrade VCS and support 0.1.x tags
This commit is contained in:
parent
4809f49aeb
commit
cb9e5bd0ae
3 changed files with 53 additions and 37 deletions
|
@ -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",
|
||||
|
|
70
composer.lock
generated
70
composer.lock
generated
|
@ -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",
|
||||
|
@ -355,16 +355,16 @@
|
|||
},
|
||||
{
|
||||
"name": "chillerlan/php-settings-container",
|
||||
"version": "2.1.5",
|
||||
"version": "2.1.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/chillerlan/php-settings-container.git",
|
||||
"reference": "f705310389264c3578fdd9ffb15aa2cd6d91772e"
|
||||
"reference": "5553558bd381fce5108c6d0343c12e488cfec6bb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/f705310389264c3578fdd9ffb15aa2cd6d91772e",
|
||||
"reference": "f705310389264c3578fdd9ffb15aa2cd6d91772e",
|
||||
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/5553558bd381fce5108c6d0343c12e488cfec6bb",
|
||||
"reference": "5553558bd381fce5108c6d0343c12e488cfec6bb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -372,15 +372,16 @@
|
|||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phan/phan": "^5.4",
|
||||
"phpcsstandards/php_codesniffer": "^3.8",
|
||||
"phpmd/phpmd": "^2.13",
|
||||
"phpunit/phpunit": "^9.6"
|
||||
"phpmd/phpmd": "^2.15",
|
||||
"phpstan/phpstan": "^1.11",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.2",
|
||||
"phpunit/phpunit": "^9.6",
|
||||
"squizlabs/php_codesniffer": "^3.10"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"chillerlan\\Settings\\": "src/"
|
||||
"chillerlan\\Settings\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -417,7 +418,7 @@
|
|||
"type": "ko_fi"
|
||||
}
|
||||
],
|
||||
"time": "2024-01-05T23:20:55+00:00"
|
||||
"time": "2024-07-17T01:04:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dragonmantank/cron-expression",
|
||||
|
@ -1719,16 +1720,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/database",
|
||||
"version": "0.50.0",
|
||||
"version": "0.50.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/database.git",
|
||||
"reference": "ce3eaccb2f3bbd34b2b97419836fec633b26b8f7"
|
||||
"reference": "1745147bef29a9bddf5dd03fd9174ec29e2c26f0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/ce3eaccb2f3bbd34b2b97419836fec633b26b8f7",
|
||||
"reference": "ce3eaccb2f3bbd34b2b97419836fec633b26b8f7",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/1745147bef29a9bddf5dd03fd9174ec29e2c26f0",
|
||||
"reference": "1745147bef29a9bddf5dd03fd9174ec29e2c26f0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1769,9 +1770,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/database/issues",
|
||||
"source": "https://github.com/utopia-php/database/tree/0.50.0"
|
||||
"source": "https://github.com/utopia-php/database/tree/0.50.1"
|
||||
},
|
||||
"time": "2024-06-21T03:21:42+00:00"
|
||||
"time": "2024-07-26T11:56:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/domains",
|
||||
|
@ -2170,16 +2171,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/migration",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/migration.git",
|
||||
"reference": "f0e7ff0a76546de353d1ea1f49605b958d407ed2"
|
||||
"reference": "f18d44d4459f78c292dac9edde856fd156fe497a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/migration/zipball/f0e7ff0a76546de353d1ea1f49605b958d407ed2",
|
||||
"reference": "f0e7ff0a76546de353d1ea1f49605b958d407ed2",
|
||||
"url": "https://api.github.com/repos/utopia-php/migration/zipball/f18d44d4459f78c292dac9edde856fd156fe497a",
|
||||
"reference": "f18d44d4459f78c292dac9edde856fd156fe497a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2189,6 +2190,7 @@
|
|||
"require-dev": {
|
||||
"laravel/pint": "1.*",
|
||||
"phpunit/phpunit": "9.*",
|
||||
"utopia-php/cli": "^0.18.0",
|
||||
"vlucas/phpdotenv": "5.*"
|
||||
},
|
||||
"type": "library",
|
||||
|
@ -2211,9 +2213,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/migration/issues",
|
||||
"source": "https://github.com/utopia-php/migration/tree/0.5.1"
|
||||
"source": "https://github.com/utopia-php/migration/tree/0.5.2"
|
||||
},
|
||||
"time": "2024-07-10T05:48:42+00:00"
|
||||
"time": "2024-07-22T09:27:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/mongo",
|
||||
|
@ -2756,16 +2758,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/vcs",
|
||||
"version": "0.6.7",
|
||||
"version": "0.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/vcs.git",
|
||||
"reference": "8d8ff1ac68e991b95adb6f91fcde8f9bb8f24974"
|
||||
"reference": "6ba177e7fcd9db97625b75e71edc12bcd8159d75"
|
||||
},
|
||||
"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/6ba177e7fcd9db97625b75e71edc12bcd8159d75",
|
||||
"reference": "6ba177e7fcd9db97625b75e71edc12bcd8159d75",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2799,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.0"
|
||||
},
|
||||
"time": "2024-06-05T17:38:29+00:00"
|
||||
"time": "2024-07-29T14:33:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/websocket",
|
||||
|
@ -3156,16 +3158,16 @@
|
|||
},
|
||||
{
|
||||
"name": "laravel/pint",
|
||||
"version": "v1.16.2",
|
||||
"version": "v1.17.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/pint.git",
|
||||
"reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca"
|
||||
"reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/pint/zipball/51f1ba679a6afe0315621ad143d788bd7ded0eca",
|
||||
"reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca",
|
||||
"url": "https://api.github.com/repos/laravel/pint/zipball/4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5",
|
||||
"reference": "4dba80c1de4b81dc4c4fb10ea6f4781495eb29f5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3218,7 +3220,7 @@
|
|||
"issues": "https://github.com/laravel/pint/issues",
|
||||
"source": "https://github.com/laravel/pint"
|
||||
},
|
||||
"time": "2024-07-09T15:58:08+00:00"
|
||||
"time": "2024-07-23T16:40:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/minify",
|
||||
|
|
|
@ -217,7 +217,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);
|
||||
|
@ -240,7 +248,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) {
|
||||
|
|
Loading…
Reference in a new issue