Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKati Paizee <kpaizee@gitlab.com>2023-11-07 12:06:10 +0300
committerKati Paizee <kpaizee@gitlab.com>2023-11-07 12:06:10 +0300
commit2818430b1770a6e403250a72bebde1c9f8745f9b (patch)
treea4611a661cfe156cf11707defbda11deb55d6e48 /Makefile
parentdbd2c55ab3adf0a953b00c3beb2ebfbc6428a02c (diff)
parent6957de98c2cbbaabf639f23327bac3eae6f7a8ff (diff)
Merge branch 'eread/avoid-setting-up-docs-in-docker-image' into 'main'
Avoid setting up documentation in Docker image See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/4369 Merged-by: Kati Paizee <kpaizee@gitlab.com> Approved-by: Kati Paizee <kpaizee@gitlab.com> Reviewed-by: Evan Read <eread@gitlab.com> Reviewed-by: Kati Paizee <kpaizee@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 25 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0593bddb..520aabad 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
.PHONY: all clean setup test up
INFO = \033[32m
+WARN = \033[33m
ERROR = \033[31m
END = \033[0m
@@ -52,6 +53,28 @@ update-all-docs-projects: update-gitlab update-gitlab-runner update-omnibus-gitl
up: setup view
+check-for-gitlab-content:
+ @printf "$(INFO)INFO: Checking for GitLab documentation content...$(END)\n"
+ @if [ -d "../gitlab/doc" ]; then printf "$(INFO)INFO: GitLab documentation exists!$(END)\n"; else printf "$(WARN)WARNING: GitLab documentation is missing.$(END) If unexpected, see <https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md#troubleshooting> for more information.\n"; fi
+
+check-for-gitlab-runner-content:
+ @printf "$(INFO)INFO: Checking for GitLab Runner documentation content...$(END)\n"
+ @if [ -d "../gitlab-runner/docs" ]; then printf "$(INFO)INFO: GitLab Runner documentation exists!$(END)\n"; else printf "$(WARN)WARNING: GitLab Runner documentation is missing.$(END) If unexpected, see <https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md#troubleshooting> for more information.\n"; fi
+
+check-for-omnibus-gitlab-content:
+ @printf "$(INFO)INFO: Checking for Omnibus GitLab documentation content...$(END)\n"
+ @if [ -d "../omnibus-gitlab/doc" ]; then printf "$(INFO)INFO: Omnibus GitLab documentation exists!$(END)\n"; else printf "$(WARN)WARNING: Omnibus GitLab documentation is missing.$(END) If unexpected, see <https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md#troubleshooting> for more information.\n"; fi
+
+check-for-charts-gitlab-content:
+ @printf "$(INFO)INFO: Checking for GitLab Charts documentation content...$(END)\n"
+ @if [ -d "../charts-gitlab/doc" ]; then printf "$(INFO)INFO: GitLab Charts documentation exists!$(END)\n"; else printf "$(WARN)WARNING: GitLab Charts documentation is missing.$(END) If unexpected, see <https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md#troubleshooting> for more information.\n"; fi
+
+check-for-gitlab-operator-content:
+ @printf "$(INFO)INFO: Checking for GitLab Operator documentation content...$(END)\n"
+ @if [ -d "../gitlab-operator/doc" ]; then printf "$(INFO)INFO: GitLab Operator documentation exists!$(END)\n"; else printf "$(WARN)WARNING: GitLab Operator documentation is missing.$(END) If unexpected, see <https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md#troubleshooting> for more information.\n"; fi
+
+check-for-all-content: check-for-gitlab-content check-for-gitlab-runner-content check-for-omnibus-gitlab-content check-for-charts-gitlab-content check-for-gitlab-operator-content
+
check-google-search-key:
ifeq ($(GOOGLE_SEARCH_KEY),)
@printf "\n$(INFO)INFO: GOOGLE_SEARCH_KEY environment variable not detected! For more information, see https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/search.md.$(END)\n"
@@ -60,7 +83,7 @@ else
endif
.PHONY: compile
-compile:
+compile: check-for-all-content
ifeq ($(SEARCH_BACKEND),lunr)
@printf "\n$(INFO)INFO: Compiling GitLab documentation site with Lunr.js search...$(END)\n"
@bundle exec nanoc compile || (printf "$(ERROR)ERROR: Compilation failed! Try running 'make setup'.$(END)\n" && exit 1)
@@ -137,7 +160,7 @@ clean:
@rm -rf tmp public
build-lunr-index:
- @printf "\n$(INFO)INFO: Building offline search index..$(END)\n"
+ @printf "\n$(INFO)INFO: Building offline search index...$(END)\n"
@node scripts/lunr/preindex.js
@find public/assets/javascripts -type f -name 'lunr*.json' -exec sh -c 'gzip -c "{}" > "{}.gz"' \;