fixes link to client reference (#4638) (#4639)

Co-authored-by: Paul Schweigert <paulschw@us.ibm.com>
This commit is contained in:
Samia Nneji 2022-01-17 14:07:30 +00:00 committed by GitHub
parent 4ce29a6979
commit 77474be4e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -40,12 +40,12 @@ def define_env(env):
@env.macro @env.macro
def clientdocs(): def clientdocs():
"""Generates a link to the client docs for the current release version. """Generates a link to the client docs for the current release version.
When the version in the KNATIVE_VERSION environment variable is
When the version in the SAMPLES_BRANCH environment variable is
empty this links to the main branch, otherwise it links to the empty this links to the main branch, otherwise it links to the
matching release in Github. matching release in Github.
""" """
version = os.environ.get("KNATIVE_VERSION") version = os.environ.get("SAMPLES_BRANCH")
if version is None: if version is None:
return 'https://github.com/knative/client/blob/main/docs/cmd/kn.md' return 'https://github.com/knative/client/blob/main/docs/cmd/kn.md'
return 'https://github.com/knative/client/blob/{version}/docs/cmd/kn.md'.format(version=version)
return 'https://github.com/knative/client/blob/release-{version}/docs/cmd/kn.md'.format(version=version)