Last active
February 24, 2017 10:41
-
-
Save imesh/cb61a6353aabb2d214f3497825cc3338 to your computer and use it in GitHub Desktop.
A bash script to generate Ballerina API documentation
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 | |
set -e | |
if [ -z "$1" ]; then | |
echo "Usage: ./generate-api-docs.sh [ballerina-version]" | |
exit -1; | |
fi | |
version=$1 | |
tools_dist=ballerina-tools-${version} | |
if [ ! -f ${tools_dist}.zip ]; then | |
echo "Downloading ${tools_dist} distribution..." | |
wget http://ballerinalang.org/downloads/ballerina-tools/ballerina-tools-${version}.zip -O ballerina-tools-${version}.zip | |
fi | |
echo "Extracting ${tools_dist} distribution..." | |
unzip ballerina-tools-${version} | |
pushd ballerina-tools-${version} | |
echo "Generating API documentation for ballerina source..." | |
bin/ballerina doc src/ -n | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment