Skip to content

Commit

Permalink
Fehler werfen bei falscher Deployer-Version (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan authored Mar 19, 2023
1 parent ef9865c commit 1805897
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

namespace Deployer;

use RuntimeException;

$version = ltrim(Deployer::get()->getConsole()->getVersion(), 'v');
if (6 !== (int) $version) {
throw new RuntimeException('YDeploy 1.x requires Deployer 6.x, but Deployer '.$version.' is used');
}

/** @psalm-suppress MissingFile */
require 'recipe/common.php';

Expand Down

0 comments on commit 1805897

Please sign in to comment.