Fix 1.0 banner again (#4601)

* strip out 'knative-' from KNATIVE_VERSION

* fixing versioning in yaml artifacts for 1.0+
This commit is contained in:
Paul Schweigert 2021-12-17 11:40:18 -05:00 committed by GitHub
parent f9e628494c
commit aea730e2aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -52,7 +52,7 @@ else
git clone --depth 1 -b ${DOCS_BRANCHES[$i+1]} https://github.com/knative/docs "$TEMP/docs-$version"
curl -f -L --show-error https://raw.githubusercontent.com/knative/serving/${RELEASE_BRANCHES[i+1]}/docs/serving-api.md -s > "$TEMP/docs-$version/docs/reference/api/serving-api.md"
curl -f -L --show-error https://raw.githubusercontent.com/knative/eventing/${RELEASE_BRANCHES[i+1]}/docs/eventing-api.md -s > "$TEMP/docs-$version/docs/reference/api/eventing-api.md"
pushd "$TEMP/docs-$version"; KNATIVE_VERSION=${RELEASE_BRANCHES[i+1]} SAMPLES_BRANCH="${DOCS_BRANCHES[i+1]}" VERSION_WARNING=true mkdocs build -d "$SITE/v$version-docs"; popd
pushd "$TEMP/docs-$version"; KNATIVE_VERSION=${RELEASE_BRANCHES[i+1]//knative-} SAMPLES_BRANCH="${DOCS_BRANCHES[i+1]}" VERSION_WARNING=true mkdocs build -d "$SITE/v$version-docs"; popd
done

View File

@ -31,7 +31,14 @@ def define_env(env):
repo=repo,
file=file)
else:
return 'https://github.com/{org}/{repo}/releases/download/{version}/{file}'.format(
if version.startswith("v1."):
return 'https://github.com/{org}/{repo}/releases/download/knative-{version}/{file}'.format(
repo=repo,
file=file,
version=version,
org=org)
else:
return 'https://github.com/{org}/{repo}/releases/download/{version}/{file}'.format(
repo=repo,
file=file,
version=version,