mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(build): extract documentation build directory from doxygen config
This commit is contained in:
parent
80581aa966
commit
1f65ecf08c
|
@ -8,7 +8,7 @@ matrix:
|
||||||
- os: linux
|
- os: linux
|
||||||
env: JOB=verify-commit-format
|
env: JOB=verify-commit-format
|
||||||
- os: linux
|
- os: linux
|
||||||
env: JOB=build-docs
|
env: JOB=build-docs DOXYGEN_CONFIG_FILE=doxygen.conf
|
||||||
- os: linux
|
- os: linux
|
||||||
env: JOB=build-ubuntu-14-04
|
env: JOB=build-ubuntu-14-04
|
||||||
- os: osx
|
- os: osx
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
# Fail out on error
|
# Fail out on error
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
@ -21,16 +22,14 @@ set -eu -o pipefail
|
||||||
# Obtain doxygen
|
# Obtain doxygen
|
||||||
sudo apt-get install doxygen
|
sudo apt-get install doxygen
|
||||||
|
|
||||||
CONFIG_FILE="doxygen.conf"
|
|
||||||
|
|
||||||
GIT_DESC=$(git describe --tags 2> /dev/null)
|
GIT_DESC=$(git describe --tags 2> /dev/null)
|
||||||
GIT_CHASH=$(git rev-parse HEAD)
|
GIT_CHASH=$(git rev-parse HEAD)
|
||||||
|
|
||||||
# Append git version to doxygen version string
|
# Append git version to doxygen version string
|
||||||
echo "PROJECT_NUMBER = \"Version: $GIT_DESC | Commit: $GIT_CHASH\"" >> "$CONFIG_FILE"
|
echo "PROJECT_NUMBER = \"Version: $GIT_DESC | Commit: $GIT_CHASH\"" >> "$DOXYGEN_CONFIG_FILE"
|
||||||
|
|
||||||
# Generate documentation
|
# Generate documentation
|
||||||
echo "Generating documentation..."
|
echo "Generating documentation..."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
doxygen "$CONFIG_FILE"
|
doxygen "$DOXYGEN_CONFIG_FILE"
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
# Fail out on error
|
# Fail out on error
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
# stop as soon as one of steps will fail
|
# stop as soon as one of steps will fail
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
|
|
@ -14,14 +14,19 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
# Fail out on error
|
# Fail out on error
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
DOCS_FOLDER="./doc/html/"
|
# Extract html documentation directory from doxygen configuration
|
||||||
|
OUTPUT_DIR_CFG=( $(grep 'OUTPUT_DIRECTORY' "$DOXYGEN_CONFIG_FILE") )
|
||||||
|
HTML_OUTPUT_CFG=( $(grep 'HTML_OUTPUT' "$DOXYGEN_CONFIG_FILE") )
|
||||||
|
|
||||||
|
DOCS_DIR="./${OUTPUT_DIR_CFG[2]}/${HTML_OUTPUT_CFG[2]}/"
|
||||||
|
|
||||||
# Ensure docs exists
|
# Ensure docs exists
|
||||||
if [ ! -d "$DOCS_FOLDER" ]
|
if [ ! -d "$DOCS_DIR" ]
|
||||||
then
|
then
|
||||||
echo "Docs deploy failing, no $DOCS_DIR present."
|
echo "Docs deploy failing, no $DOCS_DIR present."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -31,7 +36,7 @@ fi
|
||||||
GIT_CHASH=$(git rev-parse HEAD)
|
GIT_CHASH=$(git rev-parse HEAD)
|
||||||
|
|
||||||
# Push generated doxygen to GitHub pages
|
# Push generated doxygen to GitHub pages
|
||||||
cd "$DOCS_FOLDER"
|
cd "$DOCS_DIR"
|
||||||
|
|
||||||
git --quiet init
|
git --quiet init
|
||||||
git config user.name "Travis CI"
|
git config user.name "Travis CI"
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
# Fail out on error
|
# Fail out on error
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
Loading…
Reference in New Issue
Block a user