2019-09-13 11:24:10 -04:00
|
|
|
#!/usr/bin/env bash
|
2019-09-13 11:05:05 -04:00
|
|
|
|
|
|
|
set -x
|
|
|
|
set -eo pipefail
|
|
|
|
|
|
|
|
TAHOE="${PWD}"
|
2019-09-13 12:28:55 -04:00
|
|
|
git clone -b gh-pages git@github.com:tahoe-lafs/tahoe-depgraph.git
|
2019-09-13 11:05:05 -04:00
|
|
|
cd tahoe-depgraph
|
|
|
|
|
|
|
|
# Generate the maybe-changed data.
|
2019-09-17 10:21:46 -04:00
|
|
|
python "${TAHOE}"/misc/python3/tahoe-depgraph.py "${TAHOE}"
|
2019-09-13 11:05:05 -04:00
|
|
|
|
2019-09-13 12:48:42 -04:00
|
|
|
if git diff-index --quiet HEAD; then
|
2019-09-13 11:05:05 -04:00
|
|
|
echo "Declining to commit without any changes."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2019-09-13 12:51:06 -04:00
|
|
|
git config user.name 'Build Automation'
|
|
|
|
git config user.email 'tahoe-dev@tahoe-lafs.org'
|
|
|
|
|
2019-09-16 10:21:15 -04:00
|
|
|
git add tahoe-deps.json tahoe-ported.json
|
2019-09-16 09:21:05 -04:00
|
|
|
git commit -m "\
|
2019-09-13 11:05:05 -04:00
|
|
|
Built from ${CIRCLE_REPOSITORY_URL}@${CIRCLE_SHA1}
|
|
|
|
|
2019-09-13 12:52:11 -04:00
|
|
|
tahoe-depgraph was $(git rev-parse HEAD)
|
2019-09-13 11:05:05 -04:00
|
|
|
"
|
|
|
|
|
2019-09-16 10:22:56 -04:00
|
|
|
if [ "${CIRCLE_BRANCH}" != "master" ]; then
|
|
|
|
echo "Declining to update dependency graph for non-master build."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2019-09-13 11:05:05 -04:00
|
|
|
# Publish it on GitHub.
|
|
|
|
git push -q origin gh-pages
|