2017-04-05 09:00:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
GH_REPO="@github.com/librenms/librenms.git"
|
2017-04-05 11:21:09 +01:00
|
|
|
FULL_REPO="https://${LIBRENMS_TOKEN}$GH_REPO"
|
2017-04-05 09:00:28 +01:00
|
|
|
|
2017-04-05 11:47:32 +01:00
|
|
|
git config user.name "librenms-docs"
|
2017-04-05 09:00:28 +01:00
|
|
|
git config user.email "travis@librenms.org"
|
|
|
|
|
|
|
|
DBTEST=1 ./scripts/build-schema.php > misc/db_schema.yaml
|
|
|
|
STATUS=$(git status -s misc/db_schema.yaml)
|
|
|
|
|
|
|
|
if [[ "$STATUS" != "" ]]; then
|
2017-04-05 11:21:09 +01:00
|
|
|
git commit -a -m "DB Schema updated by travis after $TRAVIS_COMMIT"
|
2017-04-05 09:00:28 +01:00
|
|
|
git push -q origin master
|
|
|
|
fi
|