mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
phpDocumentator: Add runner to create apidocs
Update documentation, create runner script. refs #4085
This commit is contained in:
parent
5e39e7ebeb
commit
e1e6785ad4
64
bin/createapidoc.sh
Executable file
64
bin/createapidoc.sh
Executable file
@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
# Icinga 2 Web - Head for multiple monitoring frontends
|
||||||
|
# Copyright (C) %(YEAR)s Icinga Development Team
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# @copyright 2013 Icinga Development Team <info@icinga.org>
|
||||||
|
# @author Icinga Development Team <info@icinga.org>
|
||||||
|
# {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
|
DIR=$(readlink -f $(dirname $0)/../)
|
||||||
|
BIN=$(basename $0)
|
||||||
|
PHPDOC=$(which phpdoc)
|
||||||
|
CONFIG=$DIR/doc/phpdoc.xml
|
||||||
|
OUTPUT=$DIR/doc/api
|
||||||
|
ARG=${1-}
|
||||||
|
BUILD=""
|
||||||
|
|
||||||
|
cd $DIR
|
||||||
|
|
||||||
|
if [ ! -x $PHPDOC ]; then
|
||||||
|
echo "phpDocumentor not found (phpdoc)"
|
||||||
|
echo "Please read http://phpdoc.org/docs/latest/for-users/installation.html how to install"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d $OUTPUT ]; then
|
||||||
|
echo "Output directory exists"
|
||||||
|
echo "rm -rf $OUTPUT"
|
||||||
|
rm -rf $OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$ARG" == "--build" ]; then
|
||||||
|
BUILD="-q"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$ARG" == "--help" ]; then
|
||||||
|
echo "Usage $BIN [ --build ]"
|
||||||
|
echo ""
|
||||||
|
echo "Options:"
|
||||||
|
echo " --build Silent output"
|
||||||
|
echo " --help Print this screen"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$PHPDOC $BUILD -c $CONFIG
|
||||||
|
exit $?
|
@ -1,5 +1,27 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
# Icinga 2 Web - Head for multiple monitoring frontends
|
||||||
|
# Copyright (C) %(YEAR)s Icinga Development Team
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# @copyright 2013 Icinga Development Team <info@icinga.org>
|
||||||
|
# @author Icinga Development Team <info@icinga.org>
|
||||||
|
# {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
SCRIPTNAME=$(readlink -f $0)
|
SCRIPTNAME=$(readlink -f $0)
|
||||||
|
@ -19,6 +19,9 @@ If you generated the documentation already, you can follow [this link](apidoc/id
|
|||||||
|
|
||||||
Change to Icinga 2 Web root directory (source tree) and run:
|
Change to Icinga 2 Web root directory (source tree) and run:
|
||||||
|
|
||||||
```
|
bin/createapidoc.sh
|
||||||
phpdoc -c doc/phpdoc.xml
|
|
||||||
```
|
## Options for createapidoc.sh
|
||||||
|
|
||||||
|
--build Optional, silent build mode
|
||||||
|
--help Displays help message
|
Loading…
x
Reference in New Issue
Block a user