Skip to content

Commit a7ba0fc

Browse files
authored
Add versioning to the main documentation (#266)
* Enable tracking of tags * This is release 22.06 docs * This is nightly bump * Fixed menu links * Fixed menu links * Added script to bump version * Updated script
1 parent d6b13b2 commit a7ba0fc

File tree

5 files changed

+59
-8
lines changed

5 files changed

+59
-8
lines changed

antora-playbook.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ content:
1313
sources:
1414
- url: https://github.com/stackabletech/documentation.git
1515
branches: main
16+
tags: docs/*
1617

1718
- url: https://github.com/stackabletech/stackablectl.git
1819
branches: main

antora.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: home
2-
version: master
2+
version: "nightly"
33
title: Stackable Documentation
44
nav:
55
- modules/ROOT/nav.adoc
@@ -8,4 +8,5 @@ nav:
88
- modules/reference/nav.adoc
99
- modules/operators/nav.adoc
1010
- modules/contributor/nav.adoc
11-
- modules/ROOT/nav2.adoc
11+
- modules/ROOT/nav2.adoc
12+
prerelease: true

local-antora-playbook.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ urls:
1313
content:
1414
sources:
1515
- url: ./
16+
tags: docs/*
1617
branches: HEAD
1718

1819
- url: https://github.com/stackabletech/stackablectl.git

scripts/version_bump.sh

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Creates two commits:
5+
# - the first commit with the new version and tagged
6+
# - the second commit bumped back to nightly
7+
8+
if [ ! $# -eq 1 ]
9+
then
10+
echo "Version required. I.e.: ./script.sh 22.06"
11+
exit 1
12+
fi
13+
14+
if [ ! -z "$(git status --porcelain)" ]; then
15+
echo "There are uncommitted changes, please resolve before running this script."
16+
exit 1
17+
fi
18+
19+
export new_version="$1"
20+
21+
docs_dir="$(dirname "$0")/.."
22+
antora_file=$docs_dir/antora.yml
23+
24+
branch_name="version-bump-$new_version"
25+
26+
git checkout -b "$branch_name"
27+
28+
29+
echo "Updating $antora_file to version $new_version"
30+
yq eval --inplace '.version = strenv(new_version)' $antora_file
31+
yq eval --inplace '.prerelease = false' $antora_file
32+
33+
echo "Committing ..."
34+
git add "$antora_file"
35+
git commit -m "Set version $new_version"
36+
git tag -a "docs/$new_version" -m "Documentation for release $new_version"
37+
38+
echo "Updating $antora_file to nightly"
39+
yq eval --inplace '.version = "nightly"' $antora_file
40+
yq eval --inplace '.prerelease = true' $antora_file
41+
42+
echo "Committing..."
43+
git add "$antora_file"
44+
git commit -m "Bumped back to nightly"
45+
46+
echo ""
47+
echo "Done! Please push manually:"
48+
echo "git push --set-upstream origin $branch_name"

supplemental-ui/partials/navbar.hbs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<a class="navbar-sub-item" href="{{{ relativize "/home/index.html" }}}">Home</a>
2-
<a class="navbar-sub-item" href="{{{ relativize "/home/getting_started.html" }}}">Getting Started</a>
3-
<a class="navbar-sub-item" href="{{{ relativize "/home/concepts/index.html" }}}">Concepts</a>
4-
<a class="navbar-sub-item" href="{{{ relativize "/home/tutorials/end-to-end_data_pipeline_example.html" }}}">Tutorials</a>
1+
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/index.html" }}}">Home</a>
2+
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/getting_started.html" }}}">Getting Started</a>
3+
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/concepts/index.html" }}}">Concepts</a>
4+
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/tutorials/end-to-end_data_pipeline_example.html" }}}">Tutorials</a>
55
<a class="navbar-sub-item" href="{{{ relativize "/stackablectl/stable/index.html" }}}">stackablectl</a>
66
<div class="navbar-sub-item drop-down">
77
Operators
88
<div class="drop-down-content">
9-
<a class="drop-down-item" href="{{{ relativize "/home/operators/index.html" }}}">Overview</a>
9+
<a class="drop-down-item" href="{{{ relativize "/home/stable/operators/index.html" }}}">Overview</a>
1010
<a class="drop-down-item" href="{{{ relativize "/airflow/stable/index.html" }}}">Apache Airflow</a>
1111
<a class="drop-down-item" href="{{{ relativize "/druid/stable/index.html" }}}">Apache Druid</a>
1212
<a class="drop-down-item" href="{{{ relativize "/hbase/stable/index.html" }}}">Apache HBase</a>
@@ -23,4 +23,4 @@
2323
<a class="drop-down-item" href="{{{ relativize "/secret-operator/stable/index.html" }}}">Secret</a>
2424
</div>
2525
</div>
26-
<a class="navbar-sub-item" href="{{{ relativize "/home/contributor/index.html" }}}">Contribute</a>
26+
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/contributor/index.html" }}}">Contribute</a>

0 commit comments

Comments
 (0)