diff --git a/.clang-format b/.clang-format index bfaedf0..d2c8a4e 100644 --- a/.clang-format +++ b/.clang-format @@ -9,7 +9,7 @@ AllowShortLoopsOnASingleLine: false #AlwaysBreakBeforeMultilineStrings: true AlwaysBreakTemplateDeclarations: true BinPackParameters: true -BreakBeforeBinaryOperators: false +BreakBeforeBinaryOperators: true BreakBeforeBraces: Linux BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c99645b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: bash +script: + echo "Nothing to do" +after_success: | + set -e + curl -L https://github.com/github/hub/releases/download/v2.6.0/hub-linux-amd64-2.6.0.tgz | tar xzv + cp hub-linux-amd64-2.6.0/bin/hub /bin/hub + which hub + MESSAGE="Align Clang Format to upstream" + REPOS=Common + ORG=${TRAVIS_REPO_SLUG%%/*} + for REPO in $REPOS; do + git clone git://github.com/$ORG/$REPO + cp .clang-format $REPO + pushd $REPO + git remote + git config user.email ${TRAVIS_SECURE_EMAIL} + git config user.name ${TRAVIS_SECURE_USER} + git add .clang-format + git commit -m "${MESSAGE}" + git push "https://${TRAVIS_SECURE_TOKEN_NAME}@github.com/$ORG/$REPO" HEAD:refs/heads/coding-guidelines-update > /dev/null 2>&1 + hub pr -h coding-guidelines-update -b master -m "Coding Guidelines update of $(date +%Y-%m-%d)" + popd + done