Commit 878be085 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

run pre-commit only on changed files (all for master)

parent 3d929931
Pipeline #2393156 passed with stages
in 1 minute and 31 seconds
...@@ -26,7 +26,12 @@ pre-commit: ...@@ -26,7 +26,12 @@ pre-commit:
- curl -o lb-check-copyright "https://gitlab.cern.ch/lhcb-core/LbDevTools/raw/master/LbDevTools/SourceTools.py?inline=false" - curl -o lb-check-copyright "https://gitlab.cern.ch/lhcb-core/LbDevTools/raw/master/LbDevTools/SourceTools.py?inline=false"
- chmod +x lb-check-copyright - chmod +x lb-check-copyright
script: script:
- pre-commit run --all-files - if [ $CI_COMMIT_BRANCH == "master" ] ; then
- pre-commit run --all-files
- else
- git fetch origin master
- pre-commit run --from-ref FETCH_HEAD --to-ref HEAD
- fi
variables: variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
cache: cache:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment