From 7ec2796bf5317319d334fcf0712a5e60813ad69f Mon Sep 17 00:00:00 2001 From: dimitar-kostadinov <51451517+dimitar-kostadinov@users.noreply.github.com> Date: Thu, 17 Mar 2022 12:41:47 +0200 Subject: [PATCH] Use relative paths in module manifest (#5601) --- .docforge/manifest.yaml | 48 +++++++++++++++-------------------------- hack/check-docforge.sh | 10 ++++----- hack/tools.mk | 2 +- 3 files changed, 23 insertions(+), 37 deletions(-) diff --git a/.docforge/manifest.yaml b/.docforge/manifest.yaml index 1bfbb50fecd..430e9f3400f 100644 --- a/.docforge/manifest.yaml +++ b/.docforge/manifest.yaml @@ -1,74 +1,60 @@ -{{- $vers := Split .versions "," -}} -{{ $defaultBranch := (index $vers 0) }} structure: - name: _index.md - source: https://github.com/gardener/gardener/blob/{{$defaultBranch}}/README.md + source: /README.md - name: api-reference properties: frontmatter: title: API Reference weight: 1 aliases: "/api-reference/" - nodes: - - nodesSelector: - path: https://github.com/gardener/gardener/tree/{{$defaultBranch}}/docs/api-reference + nodesSelector: + path: /docs/api-reference - name: concepts properties: frontmatter: title: Concepts weight: 2 - nodes: - - nodesSelector: - path: https://github.com/gardener/gardener/tree/{{$defaultBranch}}/docs/concepts + nodesSelector: + path: /docs/concepts - name: deployment properties: frontmatter: title: Deployment weight: 3 - nodes: - - nodesSelector: - path: https://github.com/gardener/gardener/tree/{{$defaultBranch}}/docs/deployment + nodesSelector: + path: /docs/deployment - name: development properties: frontmatter: title: Development weight: 4 - nodes: - - nodesSelector: - path: https://github.com/gardener/gardener/tree/{{$defaultBranch}}/docs/development + nodesSelector: + path: /docs/development - name: extensions properties: frontmatter: title: Extensions weight: 5 - nodes: - - nodesSelector: - path: https://github.com/gardener/gardener/tree/{{$defaultBranch}}/docs/extensions + nodesSelector: + path: /docs/extensions - name: monitoring properties: frontmatter: title: Monitoring weight: 6 - nodes: - - nodesSelector: - path: https://github.com/gardener/gardener/tree/{{$defaultBranch}}/docs/monitoring + nodesSelector: + path: /docs/monitoring - name: proposals properties: frontmatter: title: Proposals weight: 7 - nodes: - - nodesSelector: - path: https://github.com/gardener/gardener/tree/{{$defaultBranch}}/docs/proposals + nodesSelector: + path: /docs/proposals - name: usage properties: frontmatter: title: Usage weight: 8 - nodes: - - nodesSelector: - path: https://github.com/gardener/gardener/tree/{{$defaultBranch}}/docs/usage -links: - downloads: - scope: - "gardener/gardener/(blob|raw)/(.*)/docs": ~ + nodesSelector: + path: /docs/usage diff --git a/hack/check-docforge.sh b/hack/check-docforge.sh index d333651c1a8..abde266137f 100755 --- a/hack/check-docforge.sh +++ b/hack/check-docforge.sh @@ -16,10 +16,10 @@ set -e -docCommitHash="12922abea4c5afa207cc9c09b18414cd2348890c" +docCommitHash="6a018dc6a0307e64192ab48dcb90034dd0c5102a" echo "> Check Docforge Manifest" -repoPath=${1-"$(readlink -f $(dirname ${0})/..)"} +repoPath=${1-"$(readlink -f "$(dirname "${0}")/..")"} manifestPath=${2-"${repoPath}/.docforge/manifest.yaml"} diffDirs=${3-".docforge/;docs/"} repoName=${4-"gardener"} @@ -31,9 +31,9 @@ function cleanup { } trap cleanup EXIT ERR INT TERM -curl https://raw.githubusercontent.com/gardener/documentation/${docCommitHash}/.ci/check-manifest --output ${tmpDir}/check-manifest-script.sh && chmod +x ${tmpDir}/check-manifest-script.sh -curl https://raw.githubusercontent.com/gardener/documentation/${docCommitHash}/.ci/check-manifest-config --output ${tmpDir}/manifest-config +curl https://raw.githubusercontent.com/gardener/documentation/${docCommitHash}/.ci/check-manifest --output "${tmpDir}/check-manifest-script.sh" && chmod +x "${tmpDir}/check-manifest-script.sh" +curl https://raw.githubusercontent.com/gardener/documentation/${docCommitHash}/.ci/check-manifest-config --output "${tmpDir}/manifest-config" scriptPath="${tmpDir}/check-manifest-script.sh" configPath="${tmpDir}/manifest-config" -${scriptPath} --repo-path ${repoPath} --repo-name ${repoName} --use-token ${useToken} --manifest-path ${manifestPath} --diff-dirs ${diffDirs} --config-path ${configPath} +${scriptPath} --repo-path "${repoPath}" --repo-name "${repoName}" --use-token "${useToken}" --manifest-path "${manifestPath}" --diff-dirs "${diffDirs}" --config-path "${configPath}" diff --git a/hack/tools.mk b/hack/tools.mk index 078d82d26a0..56feaacedf1 100644 --- a/hack/tools.mk +++ b/hack/tools.mk @@ -50,7 +50,7 @@ YAML2JSON := $(TOOLS_BIN_DIR)/yaml2json YQ := $(TOOLS_BIN_DIR)/yq # default tool versions -DOCFORGE_VERSION ?= v0.21.0 +DOCFORGE_VERSION ?= v0.28.0 GOLANGCI_LINT_VERSION ?= v1.44.0 HELM_VERSION ?= v3.6.3 KIND_VERSION ?= v0.11.1