Skip to content
Snippets Groups Projects
Commit 63879be3 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

Upload New File

parent 14687e71
No related branches found
No related tags found
3 merge requests!476spdlog version upgrade,!473Rerefactor,!472Merge ProcessorLandmarkExternal
Pipeline #17056 canceled
.clang_format_script:
- apt install -y clang-format-12 # available in ubuntu 20.04 or newer
- cd $CI_PROJECT_DIR
# configure git
- git remote set-url origin "ssh://git@gitlab.iri.upc.edu:2202/${CI_PROJECT_PATH}.git"
- git pull origin ${CI_COMMIT_REF_NAME}
- git config --global user.email "${CI_EMAIL}"
- git config --global user.name "${CI_USERNAME}"
# create temporary branch
- if [ `git rev-parse --verify ci_clangformat 2>/dev/null` ]; then
- git branch --delete ci_clangformat
- fi
- export CI_NEW_BRANCH_CLANG=ci_clangformat
- echo creating new temporary branch... $CI_NEW_BRANCH_CLANG
- git checkout -b $CI_NEW_BRANCH_CLANG
# apply clang format to all code files
- cd ${CI_PROJECT_DIR}
- find . -iname *.h -o -iname *.cpp -o -iname *.hpp | xargs clang-format-12 --style=file -i
# push changes (if any)
- if git commit -a -m "[skip ci] applied clang format" ; then
- git push origin $CI_NEW_BRANCH_CLANG:${CI_COMMIT_REF_NAME}
- else
- echo "No changes, nothing to commit!"
- fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment