Created
September 26, 2019 18:30
-
-
Save dinedal/164ac4f5fd44bfb6ba212986de89c65d to your computer and use it in GitHub Desktop.
Shell script that will generate a static copy of the dbt docs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dbt docs generate | |
dbt docs serve & | |
DOCS_SERVER_PID=$! | |
sleep 2 | |
until $(curl --output /dev/null --silent --head --fail http://127.0.0.1:8080/); do | |
printf '.' | |
sleep 2 | |
done | |
mkdir -p $1 | |
curl --output $1/index.htm --silent http://127.0.0.1:8080/ | |
curl --output $1/manifest.json --silent http://127.0.0.1:8080/manifest.json | |
curl --output $1/catalog.json --silent http://127.0.0.1:8080/catalog.json | |
curl --output $1/run_results.json --silent http://127.0.0.1:8080/run_results.json | |
kill $DOCS_SERVER_PID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment