This repository was archived by the owner on Oct 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 5
5
branches :
6
6
- devel
7
7
- release-0.7
8
+ - release-0.8
9
+ - release-0.9
8
10
9
11
jobs :
10
12
build :
@@ -23,16 +25,18 @@ jobs:
23
25
run : |
24
26
mkdir $HOME/output
25
27
touch $HOME/output/.nojekyll
26
- # This is the static index page for https://intel.github.io/pmem-csi,
27
- # copied from the "devel" branch.
28
- cp docs/html/index2.html $HOME/output/index.html
28
+ # https://intel.github.io/pmem-csi/ redirects to the latest stable release.
29
+ echo "<meta http-equiv=\"refresh\" content=\"0; URL='0.9/index.html'\" />" >"$HOME/output/index.html"
30
+ # "latest" used to be what "devel" is now, i.e. the documentation for the "devel"
31
+ # branch. Now it points to the latest stable release.
32
+ ln -s 0.9 "$HOME/output/latest"
29
33
- name : Build latest
30
34
run : |
31
35
GITHUB_SHA=$(git rev-parse HEAD)
32
36
export GITHUB_SHA
33
37
rm -rf _work/venv
34
38
make vhtml
35
- mv _output/html $HOME/output/latest
39
+ mv _output/html $HOME/output/devel
36
40
- uses : actions/checkout@v2
37
41
with :
38
42
ref : release-0.7
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ and bug fixes. Older releases are no longer supported.
16
16
17
17
Documentation is part of the source code for each release and also
18
18
available in rendered form for easier reading:
19
- - [ latest documentation, in development] ( https://intel.github.io/pmem-csi/latest/ )
20
- - [ latest 0.7.x release] ( https://intel.github.io/pmem-csi/0.7/ )
21
- - [ latest 0.8.x release] ( https://intel.github.io/pmem-csi/0.8/ )
22
19
- [ latest 0.9.x release] ( https://intel.github.io/pmem-csi/0.9/ )
20
+ - [ latest 0.8.x release] ( https://intel.github.io/pmem-csi/0.8/ )
21
+ - [ latest 0.7.x release] ( https://intel.github.io/pmem-csi/0.7/ )
22
+ - [ latest documentation, in development] ( https://intel.github.io/pmem-csi/devel/ )
23
23
24
24
## Supported Kubernetes versions
25
25
Original file line number Diff line number Diff line change 2
2
import json
3
3
import os
4
4
import sys
5
+ import subprocess
5
6
from os import getenv
6
7
#support for modified code block
7
8
from pygments .lexers .shell import BashSessionLexer
@@ -29,6 +30,15 @@ class copyAllConsole (BashSessionLexer):
29
30
for item in conf :
30
31
globals ()[item ] = (conf [item ])
31
32
33
+ # Dynamically determine the major version based on the branch name:
34
+ # vx.y for release-x.y, "devel" for everything else
35
+ branch = subprocess .check_output ("git rev-parse --abbrev-ref HEAD" .split (), encoding = "utf-8" )
36
+ if branch .startswith ("release-" ):
37
+ version = "v" + branch [len ("release-" ):].strip ()
38
+ else :
39
+ version = "devel"
40
+ release = version
41
+
32
42
sphinx_md_useGitHubURL = True
33
43
baseBranch = "devel"
34
44
commitSHA = getenv ('GITHUB_SHA' )
@@ -42,4 +52,4 @@ class copyAllConsole (BashSessionLexer):
42
52
githubFileURL = githubFileURL + baseBranch + "/"
43
53
githubDirURL = githubDirURL + baseBranch + "/"
44
54
sphinx_md_githubFileURL = githubFileURL
45
- sphinx_md_githubDirURL = githubDirURL
55
+ sphinx_md_githubDirURL = githubDirURL
You can’t perform that action at this time.
0 commit comments