Skip to content

Commit

Permalink
Merge branch 'develop' for v4.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrobot47 committed Apr 26, 2023
2 parents a0b5be7 + fb63a17 commit adc6bf0
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.6.5
4.6.6
18 changes: 9 additions & 9 deletions img-versions.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"easyengine/cron": "v4.6.5",
"easyengine/mailhog": "v4.6.5",
"easyengine/mariadb": "v4.6.5",
"easyengine/mariadb": "v4.6.6",
"easyengine/nginx-proxy": "v4.6.5",
"easyengine/nginx": "v4.6.5",
"easyengine/php": "v4.6.5",
"easyengine/php5.6": "v4.6.5",
"easyengine/php7.0": "v4.6.5",
"easyengine/php7.2": "v4.6.5",
"easyengine/php7.3": "v4.6.5",
"easyengine/php7.4": "v4.6.5",
"easyengine/php8.0": "v4.6.5",
"easyengine/php8.1": "v4.6.5",
"easyengine/php": "v4.6.6",
"easyengine/php5.6": "v4.6.6",
"easyengine/php7.0": "v4.6.6",
"easyengine/php7.2": "v4.6.6",
"easyengine/php7.3": "v4.6.6",
"easyengine/php7.4": "v4.6.6",
"easyengine/php8.0": "v4.6.6",
"easyengine/php8.1": "v4.6.6",
"easyengine/postfix": "v4.6.5",
"easyengine/redis": "v4.6.5",
"easyengine/newrelic-daemon": "v4.6.5"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace EE\Migration;

use EE;
use EE\Migration\Base;

class CheckAndUpdateDocker extends Base {

/**
* Execute create table query for site and sitemeta table.
*
* @throws EE\ExitException
*/
public function up() {

EE::log( 'Checking Docker version.' );
$docker_version = EE::launch( 'docker version --format "{{.Server.Version}}"' )->stdout;

if ( version_compare( $docker_version, '20.10.10', '<' ) ) {
EE::warning( 'Docker version should be 20.10.10 or above.' );

// If it is MacOS, prompt user to update docker.
if ( 'Darwin' === PHP_OS ) {
EE::confirm( 'Do you want to update Docker?' );
EE::launch( 'open "docker://"' );
}

// If it is Linux, proceed with update.
if ( 'Linux' === PHP_OS ) {
EE::log( 'Updating Docker...' );
EE::launch( 'curl -fsSL https://get.docker.com | sh' );
}
}

// Check the version again post update.
$docker_version = EE::launch( 'docker version --format "{{.Server.Version}}"' )->stdout;
if ( version_compare( $docker_version, '20.10.10', '<' ) ) {
EE::error( 'Docker version should be 20.10.10 or above. Please update Docker and try again.' );
}
}

/**
* Execute drop table query for site and sitemeta table.
*
* @throws EE\ExitException
*/
public function down() {

}
}

0 comments on commit adc6bf0

Please sign in to comment.