2020-02-25 06:59:11 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# abort if we get any error
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# always make sure we have a clean workspace
|
|
|
|
if ! git diff-index --quiet HEAD --; then
|
|
|
|
echo -e "\033[91mgit workspace is dirty and contains changes\033[0"
|
|
|
|
echo -e "\033[91mmake sure you have a clean workspace before running this script\033[0m"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# building grafana packages
|
2020-05-18 08:41:06 -05:00
|
|
|
echo "building grafana packages..."
|
2020-02-25 06:59:11 -06:00
|
|
|
yarn packages:build
|
|
|
|
|
|
|
|
# extract packages api documentation json
|
|
|
|
echo "extracting packages documentation data..."
|
|
|
|
yarn packages:docsExtract
|
|
|
|
|
|
|
|
# generating api documentation markdown
|
|
|
|
echo "generating markdown from documentation data..."
|
|
|
|
yarn packages:docsToMarkdown
|
|
|
|
|
|
|
|
# cleaning packages
|
|
|
|
echo "cleaning up packages build files..."
|
|
|
|
lerna run clean
|