Skip to content

Add versioning to the main documentation #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions antora-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ content:
sources:
- url: https://github.com/stackabletech/documentation.git
branches: main
tags: docs/*

- url: https://github.com/stackabletech/stackablectl.git
branches: main
Expand Down
5 changes: 3 additions & 2 deletions antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: home
version: master
version: "nightly"
title: Stackable Documentation
nav:
- modules/ROOT/nav.adoc
Expand All @@ -8,4 +8,5 @@ nav:
- modules/reference/nav.adoc
- modules/operators/nav.adoc
- modules/contributor/nav.adoc
- modules/ROOT/nav2.adoc
- modules/ROOT/nav2.adoc
prerelease: true
1 change: 1 addition & 0 deletions local-antora-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ urls:
content:
sources:
- url: ./
tags: docs/*
branches: HEAD

- url: https://github.com/stackabletech/stackablectl.git
Expand Down
48 changes: 48 additions & 0 deletions scripts/version_bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
set -euo pipefail

# Creates two commits:
# - the first commit with the new version and tagged
# - the second commit bumped back to nightly

if [ ! $# -eq 1 ]
then
echo "Version required. I.e.: ./script.sh 22.06"
exit 1
fi

if [ ! -z "$(git status --porcelain)" ]; then
echo "There are uncommitted changes, please resolve before running this script."
exit 1
fi

export new_version="$1"

docs_dir="$(dirname "$0")/.."
antora_file=$docs_dir/antora.yml

branch_name="version-bump-$new_version"

git checkout -b "$branch_name"


echo "Updating $antora_file to version $new_version"
yq eval --inplace '.version = strenv(new_version)' $antora_file
yq eval --inplace '.prerelease = false' $antora_file

echo "Committing ..."
git add "$antora_file"
git commit -m "Set version $new_version"
git tag -a "docs/$new_version" -m "Documentation for release $new_version"

echo "Updating $antora_file to nightly"
yq eval --inplace '.version = "nightly"' $antora_file
yq eval --inplace '.prerelease = true' $antora_file

echo "Committing..."
git add "$antora_file"
git commit -m "Bumped back to nightly"

echo ""
echo "Done! Please push manually:"
echo "git push --set-upstream origin $branch_name"
12 changes: 6 additions & 6 deletions supplemental-ui/partials/navbar.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<a class="navbar-sub-item" href="{{{ relativize "/home/index.html" }}}">Home</a>
<a class="navbar-sub-item" href="{{{ relativize "/home/getting_started.html" }}}">Getting Started</a>
<a class="navbar-sub-item" href="{{{ relativize "/home/concepts/index.html" }}}">Concepts</a>
<a class="navbar-sub-item" href="{{{ relativize "/home/tutorials/end-to-end_data_pipeline_example.html" }}}">Tutorials</a>
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/index.html" }}}">Home</a>
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/getting_started.html" }}}">Getting Started</a>
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/concepts/index.html" }}}">Concepts</a>
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/tutorials/end-to-end_data_pipeline_example.html" }}}">Tutorials</a>
<a class="navbar-sub-item" href="{{{ relativize "/stackablectl/stable/index.html" }}}">stackablectl</a>
<div class="navbar-sub-item drop-down">
Operators
<div class="drop-down-content">
<a class="drop-down-item" href="{{{ relativize "/home/operators/index.html" }}}">Overview</a>
<a class="drop-down-item" href="{{{ relativize "/home/stable/operators/index.html" }}}">Overview</a>
<a class="drop-down-item" href="{{{ relativize "/airflow/stable/index.html" }}}">Apache Airflow</a>
<a class="drop-down-item" href="{{{ relativize "/druid/stable/index.html" }}}">Apache Druid</a>
<a class="drop-down-item" href="{{{ relativize "/hbase/stable/index.html" }}}">Apache HBase</a>
Expand All @@ -23,4 +23,4 @@
<a class="drop-down-item" href="{{{ relativize "/secret-operator/stable/index.html" }}}">Secret</a>
</div>
</div>
<a class="navbar-sub-item" href="{{{ relativize "/home/contributor/index.html" }}}">Contribute</a>
<a class="navbar-sub-item" href="{{{ relativize "/home/stable/contributor/index.html" }}}">Contribute</a>