Skip to content

Commit

Permalink
Merge pull request #61 from fortrabbit/pre-release
Browse files Browse the repository at this point in the history
RC11
  • Loading branch information
Oliver Stark authored May 13, 2020
2 parents e86ca4e + d59fa88 commit c793549
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.0.0-RC11 - 2020-05-12
- Updated various dependencies
- Fixed a bug when Craft expects `CRAFT_ENVIRONMENT`

## 1.0.0-RC10 - 2020-02-19
- Craft 3.4 fix for new config/db.php structure
- Exclude `assettransformindex` table from irgnoredTables
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Craft Copy Plugin (RC10)
# Craft Copy Plugin (RC11)

This little command line tool helps to speed up common tasks around Craft CMS deployment on [fortrabbit](https://www.fortrabbit.com/). Craft Copy syncs your local development environment with your fortrabbit App — up and down. It conveniently deploys deploys code changes and synchronizes latest images and database entries. This Craft CMS plugin will be installed locally and on the fortrabbit App.

Expand Down Expand Up @@ -61,7 +61,7 @@ cd your/craft-project

# Require Craft Copy via Composer
composer config platform --unset
composer require fortrabbit/craft-copy:^1.0.0-RC10
composer require fortrabbit/craft-copy:^1.0.0-RC11

# Install the plugin with Craft CMS
php craft install/plugin copy
Expand Down
1 change: 1 addition & 0 deletions bin/craft-copy-import-db.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

// Bootstrap Craft
/** @var \craft\console\Application $app */
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
$app = require $root . '/vendor/craftcms/cms/bootstrap/console.php';

if (count($argv) < 2 || stristr($argv[1], '.sql') == false) {
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "fortrabbit/craft-copy",
"description": "Tooling for Craft on fortrabbit",
"type": "craft-plugin",
"version": "1.0.0-RC10",
"version": "1.0.0-RC11",
"keywords": [
"craft",
"cms",
Expand All @@ -24,12 +24,12 @@
"require": {
"php": "^7.2.0",
"albertofem/rsync-lib": "^1.0.0",
"cpliakas/git-wrapper": "^2.0",
"craftcms/cms": "^3.4.0-RC",
"cpliakas/git-wrapper": "^3.0",
"craftcms/cms": "^3.4.0",
"ostark/yii2-artisan-bridge": "^1.2.0",
"symfony/process": "^4.2",
"symfony/process": "^4.2 | ^5.0",
"vlucas/phpdotenv": "^2.5.1 | ^3.4.0",
"symfony/yaml": "^4.2",
"symfony/yaml": "^4.2 | ^5.0",
"fortrabbit/craft-auto-migrate":"^2.0"
},
"require-dev": {
Expand All @@ -51,7 +51,7 @@
"changelogUrl": "https://raw.githubusercontent.com/fortrabbit/craft-copy/master/CHANGELOG.md"
},
"scripts": {
"ps": "phpstan analyse src --level=6 -c phpstan.neon",
"ps": "phpstan analyse src --level=5 -c phpstan.neon",
"php-cs-fixer": "php-cs-fixer fix",
"csf": "@php-cs-fixer",
"stan": "@ps",
Expand Down
6 changes: 3 additions & 3 deletions src/Actions/AllDownAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ public function run(string $config = null): int
return ExitCode::UNSPECIFIED_ERROR;
}

if (\Craft::$app->runAction('copy/db/down', ['interactive' => true, 'force' => true]) != 0) {
if (\Craft::$app->runAction('copy/db/down', ['interactive' => true]) !== 0) {
$this->errorBlock('Failed to copy the database');
return ExitCode::UNSPECIFIED_ERROR;
}

if (\Craft::$app->runAction('copy/assets/down', ['interactive' => true]) != 0) {
if (\Craft::$app->runAction('copy/assets/down', ['interactive' => true]) !== 0) {
$this->errorBlock('Failed to copy the assets');
return ExitCode::UNSPECIFIED_ERROR;
}

if (\Craft::$app->runAction('copy/code/down', ['interactive' => true]) != 0) {
if (\Craft::$app->runAction('copy/code/down', ['interactive' => true]) !== 0) {
$this->errorBlock('Failed to copy the code');
return ExitCode::UNSPECIFIED_ERROR;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Actions/AllUpAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ public function run(string $config = null): int
return ExitCode::UNSPECIFIED_ERROR;
}

if (\Craft::$app->runAction('copy/db/up', ['interactive' => true, 'force' => true]) != 0) {
if (\Craft::$app->runAction('copy/db/up', ['interactive' => true, 'force' => true]) !== 0) {
$this->errorBlock('Failed to copy the database');
return ExitCode::UNSPECIFIED_ERROR;
}

if (\Craft::$app->runAction('copy/assets/up', ['interactive' => true]) != 0) {
if (\Craft::$app->runAction('copy/assets/up', ['interactive' => true]) !== 0) {
$this->errorBlock('Failed to copy the assets');
return ExitCode::UNSPECIFIED_ERROR;
}

if (\Craft::$app->runAction('copy/code/up', ['interactive' => true]) != 0) {
if (\Craft::$app->runAction('copy/code/up', ['interactive' => true]) !== 0) {
$this->errorBlock('Failed to copy the code');
return ExitCode::UNSPECIFIED_ERROR;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/CodeDownAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace fortrabbit\Copy\Actions;

use GitWrapper\GitException;
use GitWrapper\Exception\GitException;
use yii\console\ExitCode;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/CodeUpAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace fortrabbit\Copy\Actions;

use fortrabbit\Copy\Services\Git;
use GitWrapper\GitException;
use GitWrapper\Exception\GitException;
use yii\console\ExitCode;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Actions/SetupAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ protected function setupRemote(DeployConfig $config)
// Try to deploy code
if ($this->confirm("The plugin is not installed with your App! Do you want to deploy now?", true)) {
$this->cmdBlock('copy/code/up');
if (Craft::$app->runAction('copy/code/up', ['interactive' => $this->interactive]) != 0) {
if (Craft::$app->runAction('copy/code/up', ['interactive' => $this->interactive]) !== 0) {
// failed
return false;
}
Expand All @@ -215,7 +215,7 @@ protected function setupRemote(DeployConfig $config)

// Push DB
$this->cmdBlock('php craft copy/db/up');
if (Craft::$app->runAction('copy/db/up', ['interactive' => true, 'force' => true]) != 0) {
if (Craft::$app->runAction('copy/db/up', ['interactive' => true, 'force' => true]) !== 0) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Services/Git.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace fortrabbit\Copy\Services;

use fortrabbit\Copy\Plugin;
use GitWrapper\GitException;
use GitWrapper\Exception\GitException;
use GitWrapper\GitWorkingCopy;
use GitWrapper\GitWrapper;

Expand Down

0 comments on commit c793549

Please sign in to comment.