From 1805897a26af38aaf1b2f137eaf8086b4ef5a6ff Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Sun, 19 Mar 2023 12:17:47 +0100 Subject: [PATCH] Fehler werfen bei falscher Deployer-Version (#72) --- deploy.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deploy.php b/deploy.php index 8bb0d99..6bbf273 100644 --- a/deploy.php +++ b/deploy.php @@ -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';