File 0663-Fail-gh-actions-docbuilt-if-broken-links-or-anchors-.patch of Package erlang
From b0698d675d0f48ef35c26dd615f3292a3699b6e8 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Mon, 2 Nov 2020 15:41:26 +0100
Subject: [PATCH 3/4] Fail gh actions docbuilt if broken links or anchors exist
---
.github/dockerfiles/Dockerfile.documentation | 3 +--
scripts/otp_html_check | 4 ++++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.github/dockerfiles/Dockerfile.documentation b/.github/dockerfiles/Dockerfile.documentation
index 65d3910430..b0c2eb8015 100644
--- a/.github/dockerfiles/Dockerfile.documentation
+++ b/.github/dockerfiles/Dockerfile.documentation
@@ -12,8 +12,7 @@ RUN cd /buildroot && tar -xzf ./otp.tar.gz
WORKDIR /buildroot/otp/
-## We don't build pdf in order to save some time
-ENV RELEASE_ROOT=/otp DOC_TARGETS="html man chunks"
+ENV RELEASE_ROOT=/otp
RUN ./configure --prefix=/otp && make && make release
diff --git a/scripts/otp_html_check b/scripts/otp_html_check
index 62d5b47edd..d9c49ef30a 100755
--- a/scripts/otp_html_check
+++ b/scripts/otp_html_check
@@ -409,6 +409,10 @@ if (keys %anchor_refs) {
}
}
+if (keys %missing || keys %anchor_refs) {
+ exit 1;
+}
+
###########################################################################
--
2.26.2