-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
32 lines (32 loc) · 1.31 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
language: bash
branches:
only:
- master
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 xz
MESSAGE="Align Clang Format to upstream"
REPOS="Common ReadoutCard AliceO2 InfoLogger QualityControl Monitoring Readout Configuration"
ORG=${TRAVIS_REPO_SLUG%%/*}
# We only build if the change involves .clang-format or .travis.yml. The latter
# is to make sure that when we add new repositories we resync.
if git diff --name-only $TRAVIS_COMMIT_RANGE | grep -e "\(.clang-format\|.travis.yml\)" ; then
for REPO in $REPOS; do
echo Processing $REPO
git clone git://github.com/$ORG/$REPO
cp .clang-format $REPO
pushd $REPO
git config user.email ${TRAVIS_SECURE_EMAIL}
git config user.name ${TRAVIS_SECURE_USER}
if git add .clang-format && git commit -m "${MESSAGE}"; then
git push "https://${TRAVIS_SECURE_TOKEN_NAME}@github.com/$ORG/$REPO" HEAD:refs/heads/coding-guidelines-update -f > /dev/null 2>&1
GITHUB_TOKEN=${TRAVIS_SECURE_TOKEN_NAME} ../hub-linux-amd64-2.6.0/bin/hub pull-request -h coding-guidelines-update -b master -m "Coding Guidelines update of $(date +%Y-%m-%d)" || true
fi
popd
done
fi
branches:
only:
- master