1
0
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:
initramfs 2016-08-11 17:51:53 +08:00
parent 80581aa966
commit 1f65ecf08c
No known key found for this signature in database
GPG Key ID: 78B8BDF87E9EF0AF
6 changed files with 17 additions and 8 deletions

View File

@ -8,7 +8,7 @@ matrix:
- os: linux
env: JOB=verify-commit-format
- os: linux
env: JOB=build-docs
env: JOB=build-docs DOXYGEN_CONFIG_FILE=doxygen.conf
- os: linux
env: JOB=build-ubuntu-14-04
- os: osx

View File

@ -14,6 +14,7 @@
#
# 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
set -eu -o pipefail
@ -21,16 +22,14 @@ set -eu -o pipefail
# Obtain doxygen
sudo apt-get install doxygen
CONFIG_FILE="doxygen.conf"
GIT_DESC=$(git describe --tags 2> /dev/null)
GIT_CHASH=$(git rev-parse HEAD)
# 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
echo "Generating documentation..."
echo
doxygen "$CONFIG_FILE"
doxygen "$DOXYGEN_CONFIG_FILE"

View File

@ -12,6 +12,9 @@
# 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, see <http://www.gnu.org/licenses/>.
#
# Fail out on error
set -e -o pipefail

View File

@ -14,6 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# stop as soon as one of steps will fail
set -e -o pipefail

View File

@ -14,14 +14,19 @@
#
# 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
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
if [ ! -d "$DOCS_FOLDER" ]
if [ ! -d "$DOCS_DIR" ]
then
echo "Docs deploy failing, no $DOCS_DIR present."
exit 1
@ -31,7 +36,7 @@ fi
GIT_CHASH=$(git rev-parse HEAD)
# Push generated doxygen to GitHub pages
cd "$DOCS_FOLDER"
cd "$DOCS_DIR"
git --quiet init
git config user.name "Travis CI"

View File

@ -14,6 +14,7 @@
#
# 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
set -eu -o pipefail