diff --git a/commands/DeveloperController.php b/commands/DeveloperController.php index 18554d3..2fa9621 100644 --- a/commands/DeveloperController.php +++ b/commands/DeveloperController.php @@ -11,6 +11,7 @@ use humhub\modules\cleanTheme\models\Configuration; use humhub\modules\cleanTheme\Module; use Yii; +use yii\base\Exception; use yii\console\Controller; use yii\console\ExitCode; use yii\helpers\BaseConsole; @@ -241,13 +242,22 @@ private function correctSelect2Theme($file): void /** * Generate dynamic CSS file + * * Usage: php yii clean-theme/generate-dynamic-css-file + * * Can be used after installing the module by cloning the GitHub repository */ public function actionGenerateDynamicCssFile() { /** @var Module $module */ $module = Yii::$app->getModule('clean-theme'); - $module->configuration->generateDynamicCSSFile(); + try { + $module->configuration->generateDynamicCSSFile(); + } catch (Exception $e) { + $this->message('Could not generate dynamic CSS file: ' . $e->getMessage(), 'error'); + return ExitCode::UNSPECIFIED_ERROR; + } + $this->message("\nSuccessfully generated dynamic CSS file", 'success'); + return ExitCode::OK; } } diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 3b6e191..c42c205 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,7 +1,7 @@ Changelog ========= -Unreleased +2.2.0 (November 26, 2024) -------------------- - Enh: Add an option in the module configuration for menus to display a border instead of a background color - Chg: The body class `is-guest` is now `hh-ct-is-guest` diff --git a/module.json b/module.json index f546929..b703482 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "name": "Clean Theme", "description": "Clean theme based on the community HumHub theme", "keywords": [], - "version": "2.1.0", + "version": "2.2.0", "humhub": { "minVersion": "1.17" },