diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 803d78e86ba699c2b8db554fd85bacede9616e8c..efed9ab81148cbf2d69789a4ee3104c5861d90ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -201,8 +201,6 @@ pages: - export LISA_PYTHON=python3.${PYVERSION} script: - - sudo ./install_base.sh --install-doc-extras - - source init_env - | function lisa_python() { "$LISA_PYTHON" "$@" @@ -223,17 +221,21 @@ pages: mkdir -p "$TMPDIR" out="$(readlink -f .)/doc/public" - fn build_branch() { local branch=$1 local worktree=$(mktemp -d) + git fetch "$branch" git worktree add "$worktree" --checkout "$branch" - - sphinx-build -b html -n --no-color -W --keep-going -T -j auto "$worktree" "$out/$branch" + ( + set -e + cd "$worktree" + sudo ./install_base.sh --install-doc-extras + source init_env + sphinx-build -b html -n --no-color -W --keep-going -T -j auto . "$out/$branch" + ) } - git fetch --tags - build_branch main build_branch preview + build_branch release diff --git a/shell/lisa_shell b/shell/lisa_shell index 7e7d8b874a50dcfa16eeb1c18d104fb245544fd3..6abb7d7eaff0222546bad40de179ec0370aead20 100755 --- a/shell/lisa_shell +++ b/shell/lisa_shell @@ -209,13 +209,12 @@ function _lisa-install-system-check { function _lisa-copy-git-hook { local hook="$1" - local hooks_dir="$(git -C "$LISA_HOME" rev-parse --git-common-dir)/hooks" + local hooks_dir=$(git -C "$LISA_HOME" rev-parse --git-path hooks) local src="$LISA_HOME/tools/git-hooks/$hook" - local dst="$LISA_HOME/$hooks_dir/$hook" + local dst="$hooks_dir/$hook" # Avoid overriding existing hooks unless they are provided by LISA if [[ ! -e "$dst" ]] || grep -q 'LISA-HOOK' "$dst"; then - mkdir -p "$(basename "$dst")" && cp -v "$src" "$dst" else echo "WARNING: Could not install git hook, as it is user-provided: $src => $dst"