From 1b0d674d84044f554e7067d430267468fab6e7d1 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 6 Feb 2024 23:51:02 +0000 Subject: [PATCH 1/2] .gitlab-ci.yml: Install each branches' pages --- .gitlab-ci.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 803d78e86..efed9ab81 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 -- GitLab From 1f10bab10e915e2c288e931e11876f24038a5904 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Wed, 7 Feb 2024 00:02:10 +0000 Subject: [PATCH 2/2] shell/lisa_shell: Fix hook install in git worktrees FIX --- shell/lisa_shell | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shell/lisa_shell b/shell/lisa_shell index 7e7d8b874..6abb7d7ea 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" -- GitLab