build.sh (540B)
1 #!/bin/bash 2 3 git branch -r \ 4 | grep -v '\->' \ 5 | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" \ 6 | while read remote; do \ 7 git branch --track "${remote#origin/}" "$remote"; \ 8 done 9 10 # Conditional extens switch in config 11 export SPHINX_MULTIVERSION=1 12 13 git tag --delete latest || echo "Deleting tag can fail" 14 # Get latest version branch 15 latest=$(git for-each-ref --format "%(refname)" | grep -i '^refs/remotes/origin/v[0-9]*\.[0-9]*\.x$' | sort -r | head -n1) 16 echo $latest" is latest ref" 17 git tag latest $latest 18 sphinx-multiversion . _build