From 59f298beb2baf0c3d4a58ba68573a9d6c54d0a47 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Tue, 18 Feb 2020 15:57:17 -0800 Subject: [PATCH] Fixes #4012: Added update hook for #587 (gitignore for simulated deploys). --- src/Update/Updates.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Update/Updates.php b/src/Update/Updates.php index 929c85ad1..0d968b13e 100644 --- a/src/Update/Updates.php +++ b/src/Update/Updates.php @@ -899,4 +899,20 @@ public function update_11000020() { } } + /** + * Version 11.2.0. + * + * @Update( + * version = "11002000", + * description = "Update .gitignore with travis_wait." + * ) + */ + public function update_11002000() { + $filename = $this->updater->getRepoRoot() . '/.gitignore'; + $lines = file($filename); + if (!in_array("/travis_wait*\n", $lines)) { + file_put_contents($filename, "\n# BLT 11.2.0 update to support simulated deploys\n/travis_wait*\n", FILE_APPEND); + } + } + }