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