From 0cc40cc84a9e6bff06d42f1345f3e66e7fc44044 Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Tue, 14 May 2024 21:43:32 -0400 Subject: [PATCH] docs: add instructions for how to build user docs locally Problem: It is not crystal clear how to run user documentation HTML files locally right after checking out this repository. Solution: - Add more examples on how to run the user-docu.sh script locally. - Show error messages if a mandatory variable (`NEOVIM_DIR`) is not set. Without `$NEOVIM_DIR`, the script will fail anyway because it would behave like running `make` after cd-ing to `$HOME`. --- README.md | 4 ++++ ci/user-docu.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 4b5a9df52302..e3038706af10 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ This repo contains automation scripts and CI configuration to run the scripts. To run the scripts locally, execute `./ci/`, where `build script` is any executable shell script. Override environment variables as necessary. +### Example: Build user documentations: + + NEOVIM_DIR=~/neovim-src/ ./ci/user-docu.sh + ### Example: Generate the vim-patch report: VIM_SOURCE_DIR=~/vim-src/ NEOVIM_DIR=~/neovim-src/ ./ci/vimpatch-report.sh diff --git a/ci/user-docu.sh b/ci/user-docu.sh index f81a6bfcd185..2612eb3417c5 100755 --- a/ci/user-docu.sh +++ b/ci/user-docu.sh @@ -6,6 +6,7 @@ source ${BUILD_DIR}/ci/common/common.sh generate_user_docu() { require_environment_variable BUILD_DIR "${BASH_SOURCE[0]}" ${LINENO} + require_environment_variable NEOVIM_DIR "${BASH_SOURCE[0]}" ${LINENO} cd ${NEOVIM_DIR} make