Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Aug 22, 2018
1 parent 13d2c4e commit fbfbe2b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/rose-make-docs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ if make ${DEBUG} -C "${SPHINX_PATH}" ${BUILDS} ${SPHINX_OPTS}; then
if [[ "${DEFAULT_VERSION}" != 'none' ]]; then
(
cd "${DOCS_DIR}"
rm "${DEFAULT_ALIAS}" 2>/dev/null || true
rm -f "${DEFAULT_ALIAS}" 2>/dev/null
ln -s "${DEFAULT_VERSION:-$ROSE_VERSION}" "${DEFAULT_ALIAS}"
)
fi
Expand Down
31 changes: 22 additions & 9 deletions etc/travis-scripts
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
#!/bin/bash

#!/usr/bin/env bash
#-------------------------------------------------------------------------------
# (C) British Crown Copyright 2012-8 Met Office.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose 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 3 of the License, or
# (at your option) any later version.
#
# Rose 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 Rose. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
set -eu
set -o xtrace # for ease of debugging travis builds
shopt -s extglob
Expand Down Expand Up @@ -116,12 +133,8 @@ build-docs () {

# if we are not building the most recent tag then leave the default
# docs version (symlinked from the web root) unchanged
LATEST_TAG="$(git ls-remote --tags "${GITHUB_REPO}" | \
awk '{print $2}' | \
grep -E 'refs/tags/[^\{\}]+$' | \
cut -d '/' -f 3 | \
sort | \
tail -n 1)"
LATEST_TAG="$(git ls-remote --tags --refs 'http://github.com/metomi/rose' \
| sed 's/.*refs\/tags\/\(.*\)/\1/' | sort | tail -n 1)"
if [[ "${LATEST_TAG}" != "${TRAVIS_TAG}" ]]; then
DEFAULT_VERSION="--default-version none"
fi
Expand All @@ -130,7 +143,7 @@ build-docs () {
if ! rose make-docs --venv --dev --strict clean html slides pdf \
${DEFAULT_VERSION:-} >out 2>&1; then
# output is a bit long, only output it if the docs fail to build
cat out
cat out >2
exit 1
fi

Expand Down

0 comments on commit fbfbe2b

Please sign in to comment.