Skip to content

Commit

Permalink
Fixes #19791: Make 7.0 doc build properly
Browse files Browse the repository at this point in the history
  • Loading branch information
amousset committed Aug 16, 2021
1 parent 914884c commit 62e98cf
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 15 deletions.
17 changes: 17 additions & 0 deletions 7.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
site:
title: Rudder 7.0 Documentation
start_page: get-started::home
output:
dir: ./build/history/7.0
content:
sources:
- url: .
branches: master
start_path: src/get-started
- url: .
branches: master
start_path: src/rudder-by-example
- url: ./doc-build
branches: "branches/rudder/7.0"
start_path: src/reference

20 changes: 12 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ALL_VERSIONS = 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 3.0 3.1 3.2 4.0 4.1 4.2 4.3 5.0 6.0 6.1 6.2
VERSIONS = 6.1 6.2
ALL_VERSIONS = 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 3.0 3.1 3.2 4.0 4.1 4.2 4.3 5.0 6.0 6.1 6.2 7.0
VERSIONS = 6.1 6.2 7.0
VERSION_DOCS = $(addprefix doc-, $(VERSIONS))
VERSION_ARCHIVES = $(addsuffix .archive, $(VERSIONS))

Expand All @@ -9,11 +9,11 @@ SITES = $(GENERIC_DOCS) $(VERSIONS)

LATEST_MAJOR=$(shell curl https://www.rudder-project.org/release-info/rudder/versions/latest)

.PHONY: prepare rudder-theme/build/ui-bundle.zip optipng doc-build changelogs-build build/sites/site/.htaccess build/history/6.1/.htaccess build/history/6.2/.htaccess build/files $(SITES)
.PHONY: prepare rudder-theme/build/ui-bundle.zip optipng doc-build changelogs-build build/sites/site/.htaccess build/history/6.1/.htaccess build/history/6.2/.htaccess build/history/7.0/.htaccess build/files $(SITES)
.DEFAULT_GOAL := local

all: $(GENERIC_DOCS) build/sites/site/.htaccess build/history/6.1/.htaccess build/history/6.2/.htaccess $(VERSION_ARCHIVES) build/files test
online: site site-dev build/sites/site/.htaccess build/history/6.1/.htaccess build/history/6.2/.htaccess $(VERSION_ARCHIVES) build/files
all: $(GENERIC_DOCS) build/sites/site/.htaccess build/history/6.1/.htaccess build/history/6.2/.htaccess build/history/7.0/.htaccess $(VERSION_ARCHIVES) build/files test
online: site site-dev build/sites/site/.htaccess build/history/6.1/.htaccess build/history/6.2/.htaccess build/history/7.0/.htaccess $(VERSION_ARCHIVES) build/files
local: site-local test

rudder-theme/build/ui-bundle.zip:
Expand All @@ -31,7 +31,7 @@ doc-build:
cd $@/src/reference && make
cd $@ && git add -f src/reference && git commit --allow-empty -m "Build 6.2"
cd $@ && git clean -fd
cd $@ && git checkout master && git pull
cd $@ && git checkout branches/rudder/7.0 && git pull
cd $@/src/reference && make
cd $@ && git add -f src/reference && git commit --allow-empty -m "Build 7.0"

Expand All @@ -40,8 +40,8 @@ changelogs-build:
cd $@ && git checkout master && git pull
for version in $(ALL_VERSIONS); do \
cd $@ && git checkout master && git branch -df "branches/rudder/$$version" ; git checkout -b "branches/rudder/$$version" ; \
sed -i "s@version: \"6.2\"@version: \"$$version\"@" src/changelogs/antora.yml ; \
sed -i "s@RUDDER_VERSION = 6.2@RUDDER_VERSION = $$version@" src/changelogs/dependencies/Makefile ; \
sed -i "s@version: \"7.0\"@version: \"$$version\"@" src/changelogs/antora.yml ; \
sed -i "s@RUDDER_VERSION = 7.0@RUDDER_VERSION = $$version@" src/changelogs/dependencies/Makefile ; \
cd src/changelogs && make ; \
cd ../.. && git add -f src/changelogs && git commit --allow-empty -m "Build" ; cd .. ; \
done
Expand Down Expand Up @@ -72,6 +72,10 @@ build/history/6.2/.htaccess:
mkdir -p build/history/6.2/
echo 'Redirect /rudder-doc/reference/current/ /rudder-doc/reference/6.2/' > $@

build/history/7.0/.htaccess:
mkdir -p build/history/7.0/
echo 'Redirect /rudder-doc/reference/current/ /rudder-doc/reference/7.0/' > $@

# Download documentation files
build/files:
mkdir -p build/files
Expand Down
5 changes: 4 additions & 1 deletion rudder-theme/src/partials/navigation-explore.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<li class="component">
<span class="title">Public API reference</span>
<ul class="versions">
<li class="version is-latest">
<a href="https://docs.rudder.io/api/v/14/">7.0 (v14)</a>
</li>
<li class="version is-latest">
<a href="https://docs.rudder.io/api/v/13/">6.2 (v13)</a>
</li>
Expand All @@ -49,7 +52,7 @@
<span class="title">Relay API reference</span>
<ul class="versions">
<li class="version is-latest">
<a href="https://docs.rudder.io/api/relay/v/1/">6 (v1)</a>
<a href="https://docs.rudder.io/api/relay/v/1/">6-7 (v1)</a>
</li>
</ul>
</span>
Expand Down
2 changes: 1 addition & 1 deletion site-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ content:
branches: master
start_path: src/rudder-by-example
- url: ./doc-build
branches: ["branches/rudder/6.1", "branches/rudder/6.2"]
branches: ["branches/rudder/6.1", "branches/rudder/6.2", "branches/rudder/7.0"]
start_path: src/reference
- url: .
branches: master
Expand Down
3 changes: 2 additions & 1 deletion site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ content:
branches: master
start_path: src/rudder-by-example
- url: ./doc-build
branches: ["branches/rudder/6.1", "branches/rudder/6.2"]
branches: ["branches/rudder/6.1", "branches/rudder/6.2", "branches/rudder/7.0"]
start_path: src/reference
- url: ./changelogs-build
branches:
Expand All @@ -37,4 +37,5 @@ content:
- "branches/rudder/6.0"
- "branches/rudder/6.1"
- "branches/rudder/6.2"
- "branches/rudder/7.0"
start_path: src/changelogs
2 changes: 1 addition & 1 deletion src/changelogs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: changelogs
title: Changelogs
version: "6.2"
version: "7.0"
nav:
- modules/ROOT/nav.adoc

2 changes: 1 addition & 1 deletion src/changelogs/dependencies/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Builds dynamic dependencies from other repos

RUDDER_VERSION = 6.2
RUDDER_VERSION = 7.0

.PHONY: clean changelogs
all: changelogs
Expand Down
2 changes: 1 addition & 1 deletion src/reference/antora.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: reference
title: Reference manual
version: "6.2"
version: "7.0"
nav:
- modules/ROOT/nav.adoc
- modules/installation/nav.adoc
Expand Down
2 changes: 1 addition & 1 deletion src/reference/dependencies/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Builds dynamic dependencies from other repos

RUDDER_VERSION = 6.2
RUDDER_VERSION = 7.0

.PHONY: clean generic_methods.adoc generic_methods_categories.txt rudder.adoc rudder-relayd.1.adoc hooks.adoc plugins versions.adoc version-compat.adoc
all: generic_methods.adoc hooks.adoc rudder.adoc rudder-relayd.1.adoc plugins version-compat.adoc
Expand Down

0 comments on commit 62e98cf

Please sign in to comment.