Browse Source

chore(build): extract documentation build directory from doxygen config

reviewable/pr3614/r8
initramfs 9 years ago
parent
commit
1f65ecf08c
No known key found for this signature in database
GPG Key ID: 78B8BDF87E9EF0AF
  1. 2
      .travis.yml
  2. 7
      .travis/build-docs.sh
  3. 3
      .travis/build-osx.sh
  4. 1
      .travis/build-ubuntu-14-04.sh
  5. 11
      .travis/deploy-docs.sh
  6. 1
      .travis/verify-commit-format.sh

2
.travis.yml

@ -8,7 +8,7 @@ matrix: @@ -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

7
.travis/build-docs.sh

@ -14,6 +14,7 @@ @@ -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 @@ -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"

3
.travis/build-osx.sh

@ -12,6 +12,9 @@ @@ -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

1
.travis/build-ubuntu-14-04.sh

@ -14,6 +14,7 @@ @@ -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

11
.travis/deploy-docs.sh

@ -14,14 +14,19 @@ @@ -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 @@ -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"

1
.travis/verify-commit-format.sh

@ -14,6 +14,7 @@ @@ -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

Loading…
Cancel
Save