Skip to content

Commit

Permalink
Maintenance: Improve overcommit to run multiple custom commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Jun 9, 2022
1 parent 7ed2d5c commit 8454dd5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .overcommit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -eux

echo "Checking .pot catalog consistency..."
rails generate translation_catalog --check

.gitlab/check_graphql_api_consistency.sh
6 changes: 3 additions & 3 deletions .overcommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ PreCommit:
exclude: 'public/assets/chat/**/*'
CustomScript:
enabled: true
description: 'Check if translation catalog is up-to-date'
required_executable: 'rails'
flags: ['generate', 'translation_catalog', '--check']
description: 'Perform custom Zammad code checks'
required_executable: 'bash'
flags: ['.overcommit.sh']
Stylelint:
enabled: true
EsLint:
Expand Down
2 changes: 1 addition & 1 deletion script/build/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rm -rf .rubocop
rm .stylelintrc.json .eslintignore .eslintrc .eslintrc.js .prettierrc.json
rm coffeelint.json
rm -rf .coffeelint
rm .overcommit.yml
rm .overcommit.*

# misc
rm .codeclimate.yml

0 comments on commit 8454dd5

Please sign in to comment.