From 715250dbd7c6223f724e1689ad364482e6a02f91 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Wed, 8 May 2024 12:46:47 +1200 Subject: [PATCH] FIX Don't include installer for non-modules --- job_creator.php | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/job_creator.php b/job_creator.php index c626d82..f420560 100644 --- a/job_creator.php +++ b/job_creator.php @@ -678,25 +678,23 @@ private function needsInstallerVersion(): bool if (in_array($this->repoName, NO_INSTALLER_REPOS)) { return false; } - // We shouldn't try to infer the installer version for regular repositories - // that we don't know anything about - if (empty($this->repoData)) { - if (!file_exists($this->composerJsonPath)) { - return false; - } - $json = $this->getComposerJsonContent(); - $silverstripeRepoTypes = [ - 'silverstripe-vendormodule', - 'silverstripe-module', - 'silverstripe-recipe', - 'silverstripe-theme', - ]; - return isset($json->type) && in_array($json->type, $silverstripeRepoTypes); + // Recipes don't need installer unless they're handled in FORCE_INSTALLER_REPOS above + if (!empty($this->repoData) && $this->repoData['type'] === 'recipe') { + return false; } - if ($this->repoData['type'] === 'recipe') { + // We shouldn't try to infer the installer version for regular repositories + if (!file_exists($this->composerJsonPath)) { return false; } - return true; + $json = $this->getComposerJsonContent(); + // Only include installer for Silverstipe CMS modules + $silverstripeRepoTypes = [ + 'silverstripe-vendormodule', + 'silverstripe-module', + 'silverstripe-recipe', + 'silverstripe-theme', + ]; + return isset($json->type) && in_array($json->type, $silverstripeRepoTypes); } private function getComposerJsonContent(): ?stdClass