diff --git a/README.md b/README.md index 34731e0..f19bd40 100644 --- a/README.md +++ b/README.md @@ -15,15 +15,15 @@ This command generates the documentation and deploys it on your CodeDoc space ### arguments -- `-d --dir [dir]` path to the documentation root - **required** +- `-l --loc [dir]` location of the documentation sources root - **required** - `-t --type [docusaurus|doxygen|swagger]` type of documentation generator to use. - **required** -- `-l --dest [dir]` path to where to put the documentation outputs in your repository's CodeDoc space - **optional !! cannot be absolute !!** +- `-d --dest [dir]` path to where to put the documentation outputs in your repository's CodeDoc space - **optional !! cannot be absolute !!** usage examples : ``` -/entrypoint.sh -d ./documentation/api -t swagger -l api_documentation -/entrypoint.sh -d ./documentation/app -t docusaurus -l application_documentation -/entrypoint.sh -d ./src -t doxygen -l sourcecode_documentation +/entrypoint.sh -l ./documentation/api/api-swagger.yml -t swagger -d api_documentation +/entrypoint.sh -l ./documentation/app -t docusaurus -d application_documentation +/entrypoint.sh -l ./src -t doxygen -d sourcecode_documentation ``` diff --git a/entrypoint.sh b/entrypoint.sh index fc28b2c..9dbbbfe 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,9 +8,9 @@ echo "Generating and deploying documentation for user $DRONE_REPO_OWNER and repo help() { cat <&2 + if [[ ! "$1" ]]; then + echo "missing swagger config file ($1)" >&2 fi + mkdir -p $GEN_PATH + echo " - + -

Suivez ce lien.

+

Suivez ce lien.

" > $GEN_PATH/CLICKME.html - mkdir -p $GEN_PATH - mv "$SWAGGER_FILE" $GEN_PATH + mv "$1" $GEN_PATH }