Browse Source
Merge pull request #231 from lub/gendoc
fix race condition in doc generation
pull/265/head
Travis Ralston
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
6 deletions
-
gendoc.sh
|
@ -9,13 +9,10 @@ GOPATH=$(pwd):$(pwd)/vendor godoc -http=localhost:6060 & |
|
|
DOC_PID=$! |
|
|
DOC_PID=$! |
|
|
|
|
|
|
|
|
# Wait for the server to init |
|
|
# Wait for the server to init |
|
|
while : |
|
|
|
|
|
|
|
|
until curl -fs "http://localhost:6060/pkg/github.com/matrix-org/go-neb/" > /dev/null |
|
|
do |
|
|
do |
|
|
curl -s "http://localhost:6060" > /dev/null |
|
|
|
|
|
if [ $? -eq 0 ] # exit code is 0 if we connected |
|
|
|
|
|
then |
|
|
|
|
|
break |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
# no-op |
|
|
|
|
|
: |
|
|
done |
|
|
done |
|
|
|
|
|
|
|
|
# Scrape the pkg directory for the API docs. Scrap lib for the CSS/JS. Ignore everything else. |
|
|
# Scrape the pkg directory for the API docs. Scrap lib for the CSS/JS. Ignore everything else. |
|
|