| Line | |
|---|
| 1 | #!/usr/bin/env bash |
|---|
| 2 | |
|---|
| 3 | set -x |
|---|
| 4 | set -eo pipefail |
|---|
| 5 | |
|---|
| 6 | TAHOE="${PWD}" |
|---|
| 7 | git clone -b gh-pages git@github.com:tahoe-lafs/tahoe-depgraph.git |
|---|
| 8 | cd tahoe-depgraph |
|---|
| 9 | |
|---|
| 10 | # Generate the maybe-changed data. |
|---|
| 11 | python "${TAHOE}"/misc/python3/tahoe-depgraph.py "${TAHOE}" |
|---|
| 12 | |
|---|
| 13 | if git diff-index --quiet HEAD; then |
|---|
| 14 | echo "Declining to commit without any changes." |
|---|
| 15 | exit 0 |
|---|
| 16 | fi |
|---|
| 17 | |
|---|
| 18 | git config user.name 'Build Automation' |
|---|
| 19 | git config user.email 'tahoe-dev@lists.tahoe-lafs.org' |
|---|
| 20 | |
|---|
| 21 | git add tahoe-deps.json tahoe-ported.json |
|---|
| 22 | git commit -m "\ |
|---|
| 23 | Built from ${CIRCLE_REPOSITORY_URL}@${CIRCLE_SHA1} |
|---|
| 24 | |
|---|
| 25 | tahoe-depgraph was $(git rev-parse HEAD) |
|---|
| 26 | " |
|---|
| 27 | |
|---|
| 28 | if [ "${CIRCLE_BRANCH}" != "master" ]; then |
|---|
| 29 | echo "Declining to update dependency graph for non-master build." |
|---|
| 30 | exit 0 |
|---|
| 31 | fi |
|---|
| 32 | |
|---|
| 33 | # Publish it on GitHub. |
|---|
| 34 | git push -q origin gh-pages |
|---|
Note: See
TracBrowser
for help on using the repository browser.