1*2d1272b8SAndroid Build Coastguard Worker#!/bin/bash 2*2d1272b8SAndroid Build Coastguard Worker 3*2d1272b8SAndroid Build Coastguard Workerset -x 4*2d1272b8SAndroid Build Coastguard Workerset -o errexit -o nounset 5*2d1272b8SAndroid Build Coastguard Worker 6*2d1272b8SAndroid Build Coastguard WorkerDOCSDIR=build-docs 7*2d1272b8SAndroid Build Coastguard WorkerREVISION=$(git rev-parse --short HEAD) 8*2d1272b8SAndroid Build Coastguard Worker 9*2d1272b8SAndroid Build Coastguard Workerrm -rf $DOCSDIR || exit 10*2d1272b8SAndroid Build Coastguard Workermkdir $DOCSDIR 11*2d1272b8SAndroid Build Coastguard Workercd $DOCSDIR 12*2d1272b8SAndroid Build Coastguard Worker 13*2d1272b8SAndroid Build Coastguard Workercp ../build/docs/html/* . 14*2d1272b8SAndroid Build Coastguard Worker#cp ../build/docs/CNAME . 15*2d1272b8SAndroid Build Coastguard Worker 16*2d1272b8SAndroid Build Coastguard Workergit init 17*2d1272b8SAndroid Build Coastguard Workergit branch -m main 18*2d1272b8SAndroid Build Coastguard Workergit config user.name "CI" 19*2d1272b8SAndroid Build Coastguard Workergit config user.email "[email protected]" 20*2d1272b8SAndroid Build Coastguard Workerset +x 21*2d1272b8SAndroid Build Coastguard Workerecho "git remote add upstream \"https://\[email protected]/harfbuzz/harfbuzz.github.io.git\"" 22*2d1272b8SAndroid Build Coastguard Workergit remote add upstream "https://[email protected]/harfbuzz/harfbuzz.github.io.git" 23*2d1272b8SAndroid Build Coastguard Workerset -x 24*2d1272b8SAndroid Build Coastguard Workergit fetch upstream 25*2d1272b8SAndroid Build Coastguard Workergit reset upstream/main 26*2d1272b8SAndroid Build Coastguard Worker 27*2d1272b8SAndroid Build Coastguard Workertouch . 28*2d1272b8SAndroid Build Coastguard Workergit add -A . 29*2d1272b8SAndroid Build Coastguard Worker 30*2d1272b8SAndroid Build Coastguard Workerif [[ $(git status -s) ]]; then 31*2d1272b8SAndroid Build Coastguard Worker git commit -m "Rebuild docs for https://github.com/harfbuzz/harfbuzz/commit/$REVISION" 32*2d1272b8SAndroid Build Coastguard Worker git push -q upstream HEAD:main 33*2d1272b8SAndroid Build Coastguard Workerfi 34