From 525698d834eaa136cae1e311b269d97a56c6a51b Mon Sep 17 00:00:00 2001 From: Yassine Doghri Date: Wed, 12 May 2021 14:12:39 +0000 Subject: [PATCH] ci: remove git hooks before uninstalling composer dev dependencies --- .gitlab-ci.yml | 11 ++++++++--- app/Controllers/HomeController.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa01fbfe..ef4c9766 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,6 +41,11 @@ before_script: - php composer.phar install --prefer-dist --no-ansi --no-interaction --no-progress --ignore-platform-reqs - npm install +commit-message: + stage: init + script: + - npx commitlint CI_COMMIT_MESSAGE + tests: stage: quality script: @@ -55,6 +60,9 @@ code-review: bundle_app: stage: bundle script: + # delete installed git hooks because captainhooks (dev dependency) will be removed + - rm -rf ./.git/hooks + # remove dev dependencies using the --no-dev option - php composer.phar install --no-dev --prefer-dist --no-ansi --no-interaction --no-progress --ignore-platform-reqs @@ -91,9 +99,6 @@ release_app: # IMPORTANT: delete local git tags before release to prevent eventual script failure (ie. tag already exists) - git tag | xargs git tag -d - # IMPORTANT: no need to run git hooks, just remove them - - rm -rf ./.git/hooks - # run semantic-release script (configured in `.releaserc.json` file) - npm run release only: diff --git a/app/Controllers/HomeController.php b/app/Controllers/HomeController.php index 251f7eb3..f59a5b7f 100644 --- a/app/Controllers/HomeController.php +++ b/app/Controllers/HomeController.php @@ -13,7 +13,7 @@ use App\Models\PodcastModel; class HomeController extends BaseController { /** - * @return mixed + * @return RedirectResponse|string */ public function index() {