grafana/scripts/ci-reference-docs-build.sh
Marcus Andersson b5196f531c
Build: added steps to generate packages api documentation. (#27930)
* added steps to generate docs.

* re-generated the drone.yml file.

* removed metrics reporting from pr pipeline.

* fixed spelling issues.

* fixed so package generation should work.

* some small refactorings.

* fixed spelling error.

* adding echo to verify that we execute the correct script.

* removed echo statement.

* changed scripts a bit.

* added ci flag to script.

* adding exit 1

* increased the limit.

* added missing space.

* fixed shellcheck error.

* fixing lint errors.

* renamed build step.

* changed logic.

* increased limit.

* changed to echo instead of echo -e

* fixed shellcheck errors.

* trying to debug script,

* trying to simplify the find statement.

* fixed issue with text formatting on linux.

* imported build step.

* Update scripts/ci-reference-docs-lint.sh

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* removed cleanup of packages.

* increased limit.

* will build frontend docs on master but not lint it.

* will always run the linting step.

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-14 14:35:55 +02:00

24 lines
557 B
Bash
Executable File

#!/bin/bash
# abort if we get any error
set -eo pipefail
BUILD_MODE="${1-local}"
if [ "local" == "$BUILD_MODE" ]
then
# building grafana packages
echo "building grafana packages..."
yarn packages:build
else
echo "skip building grafana packages since it already built in previous steps..."
fi
# 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