From 77474be4e8994b5132488691accd4480c2749821 Mon Sep 17 00:00:00 2001 From: Samia Nneji Date: Mon, 17 Jan 2022 14:07:30 +0000 Subject: [PATCH] fixes link to client reference (#4638) (#4639) Co-authored-by: Paul Schweigert --- hack/macros.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hack/macros.py b/hack/macros.py index b3890e604..dfbff3a84 100644 --- a/hack/macros.py +++ b/hack/macros.py @@ -40,12 +40,12 @@ def define_env(env): @env.macro def clientdocs(): """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 matching release in Github. """ - version = os.environ.get("KNATIVE_VERSION") + version = os.environ.get("SAMPLES_BRANCH") if version is None: return 'https://github.com/knative/client/blob/main/docs/cmd/kn.md' - - return 'https://github.com/knative/client/blob/release-{version}/docs/cmd/kn.md'.format(version=version) + return 'https://github.com/knative/client/blob/{version}/docs/cmd/kn.md'.format(version=version)