From 4b339fb1f02f213923df59d1684fa88006e0c918 Mon Sep 17 00:00:00 2001 From: Hannes Kirsman Date: Fri, 28 Jun 2024 09:57:04 +0300 Subject: [PATCH] #1 Fix dist file copy. --- src/InstallHelperPlugin.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/InstallHelperPlugin.php b/src/InstallHelperPlugin.php index c419d4a..11b2835 100644 --- a/src/InstallHelperPlugin.php +++ b/src/InstallHelperPlugin.php @@ -137,25 +137,25 @@ public function onWunderIoDrupalGitlabLocalPipelinesPackageUpdate(PackageEvent $ private function deployDistFiles(): void { $dest_dir = "{$this->projectDir}"; - $paths_to_force_copy = [ + $dist_paths_to_force_copy = [ '.grumphp.yml', ]; - $path_to_copy_if_not_exists = [ + $dist_path_to_copy_if_not_exists = [ // According to https://project.pages.drupalcode.org/gitlab_templates/jobs/phpcs/ // module can have it's own phpcs.xml file. So let's not overwrite it. '.phpcs.xml', ]; // Copy files to project root. - foreach ($paths_to_force_copy as $path) { - $src = "{$this->vendorDir}/" . self::PACKAGE_NAME . "/$path"; + foreach ($dist_paths_to_force_copy as $path) { + $src = "{$this->vendorDir}/" . self::PACKAGE_NAME . "/dist/$path"; self::copy($src, $dest_dir); } // Copy files to project root if they don't exist. - foreach ($path_to_copy_if_not_exists as $path) { - $src = "{$this->vendorDir}/" . self::PACKAGE_NAME . "/$path"; + foreach ($dist_path_to_copy_if_not_exists as $path) { + $src = "{$this->vendorDir}/" . self::PACKAGE_NAME . "/dist/$path"; if (!file_exists("$dest_dir/$path")) { self::copy($src, $dest_dir); }