From a8e6499c37dced8ea3412fad2ba9cde0e9dc9aa7 Mon Sep 17 00:00:00 2001 From: hahn <axel.hahn@iml.unibe.ch> Date: Wed, 20 Jul 2022 15:31:11 +0200 Subject: [PATCH] update docs in build plugin files --- .../deployment/classes/build.interface.php | 26 +++---------------- .../deployment/classes/build_base.class.php | 14 +++++++--- .../plugins/build/tgz/build_tgz.php | 3 +-- 3 files changed, 16 insertions(+), 27 deletions(-) diff --git a/public_html/deployment/classes/build.interface.php b/public_html/deployment/classes/build.interface.php index d91037d1..9c9abf36 100644 --- a/public_html/deployment/classes/build.interface.php +++ b/public_html/deployment/classes/build.interface.php @@ -5,37 +5,19 @@ * @author hahn */ interface iBuildplugin { - - // ---------------------------------------------------------------------- - // VERIFY - // ---------------------------------------------------------------------- /** - * check requirements if the plugin could work - public function checkRequirements(); + * get an array of commands to check requirements + * if the plugin is able to work + * @return array */ + public function checkRequirements(); /** * get an array with shell commands to execute * @return array */ public function getBuildCommands(); - - /** - * get name of plugin as string ... language specific - public function getName(); - */ - - /** - * get description of plugin as string ... language specific - public function getDescription(); - */ - - /** - * get array of data in info.js - public function getPluginInfos(); - */ - } diff --git a/public_html/deployment/classes/build_base.class.php b/public_html/deployment/classes/build_base.class.php index 29f22c15..5f46ec49 100644 --- a/public_html/deployment/classes/build_base.class.php +++ b/public_html/deployment/classes/build_base.class.php @@ -111,15 +111,23 @@ class build_base implements iBuildplugin{ return $this->_sOutfile=$sOutFilename ? $sOutFilename.$this->getExtension() : $this->_sOutfile; } - // --------------------------------------------------------------- // GETTER // --------------------------------------------------------------- + + /** + * check requirements if the plugin could work + * @return array + */ + public function checkRequirements() { + return [ + 'echo "ERROR: The method checkRequirements() was not implemented in the build plugin ['.$this->getId().']"', + 'exit 1' + ]; + } /** * get an array with shell commands to execute - * @param string $sBuildDir full path of the build directory - * @param string $sOutFilename filename for output * @return array */ public function getBuildCommands(){ diff --git a/public_html/deployment/plugins/build/tgz/build_tgz.php b/public_html/deployment/plugins/build/tgz/build_tgz.php index 6242ea76..743a570b 100644 --- a/public_html/deployment/plugins/build/tgz/build_tgz.php +++ b/public_html/deployment/plugins/build/tgz/build_tgz.php @@ -10,6 +10,7 @@ class build_tgz extends build_base { /** * check requirements if the plugin could work + * @return array */ public function checkRequirements() { return [ @@ -19,8 +20,6 @@ class build_tgz extends build_base { /** * get an array with shell commands to execute - * @param string $sBuildDir full path of the build directory - * @param string $sOutFilename filename for output * @return array */ public function getBuildCommands(){ -- GitLab