{{ i18n "relnote_download_title" }}
{{ i18n "relnote_download_detail" }}
{{ $full_version := .Page.Params.release }} {{ $parts := split $full_version "." }} {{ $version := printf "%s.%s" (index $parts 0) (index $parts 1) }} {{ $patch := int (index $parts 2) }} {{ $release_name := strings.TrimSuffix ".0" $full_version }} {{ $page_version := int (index $parts 0) }} {{ $page_revision := int (index $parts 1) }} {{ $page_patch := int (index $parts 2) }} {{ $site_parts := split .Site.Data.args.full_version "." }} {{ $site_version := int (index $site_parts 0) }} {{ $site_revision := int (index $site_parts 1) }} {{ $site_patch := int (index $site_parts 2) }} {{ $site_normalized_version := add (add (mul $site_version 1000000) (mul $site_revision 1000)) $site_patch }} {{ $page_normalized_version := add (add (mul $page_version 1000000) (mul $page_revision 1000)) $page_patch }} {{ if gt $page_normalized_version $site_normalized_version }} {{ errorf "Can't have a release note with a greater version then the site's version (%s vs %s)" $full_version $.Site.Data.args.full_version }} {{ end }} {{ $home := .Site.GetPage "home" }} {{ $lang := $home.Lang }} {{ if eq $lang "en" }} {{ $lang = "" }} {{ else }} {{ $lang = "/zh" }} {{ end }} {{/* establish latest corresponding patch release */}} {{ $latest_patch := 0 }} {{ $latest_patch_url := "" }} {{ range $page := .Site.RegularPages }} {{ $release := $page.Params.release }} {{ if $release }} {{ $parts := split $release "." }} {{ $v := printf "%s.%s" (index $parts 0) (index $parts 1) }} {{ $p := int (index $parts 2) }} {{ if eq $version $v }} {{ if gt $p $latest_patch }} {{ $latest_patch = $p }} {{ $latest_patch_url = $page.Permalink }} {{ end }} {{ end }} {{ end }} {{ end }} {{ $latest_full_version := printf "%s.%d" $version $latest_patch }} {{ $release_location := "archive" }} {{ if and .Site.Data.args.preliminary (eq $version .Site.Data.args.version) }} {{ $release_location = "preliminary" }} {{ else if eq $version .Site.Data.versions.main }} {{ $release_location = "main" }} {{ end }}
{{ i18n "relnote_change_notes_detail" }}
{{ end }} {{ $upgrade_notes := .Page.GetPage "./upgrade-notes" }} {{ if not $upgrade_notes }} {{ $base_version := printf "%v.%v.0" $page_version $page_revision }} {{ range $page := where .Site.Pages ".Params.release" $base_version }} {{ $path := printf "/%supgrade-notes" $page.File.Dir }} {{ $upgrade_notes = .Page.GetPage $path }} {{ end }} {{ end }} {{ if $upgrade_notes }}{{ i18n "relnote_before_you_upgrade_detail" }}
{{ end }} {{ if eq $release_location "preliminary" }}{{ i18n "relnote_download_detail" }}
{{ i18n "relnote_download_detail" }}
{{ else }} {{ if eq $release_location "main" }} {{ if .Site.Data.args.preliminary }} {{/* we don't go to the language-specific page, since it might not be there when introducing a new language */}} {{ $download_link = printf "https://istio.io/docs/setup/additional-setup/download-istio-release/" }} {{ else if not .Site.Data.args.archive }} {{ $download_link = printf "%s/docs/setup/additional-setup/download-istio-release/" $lang }} {{ end }} {{ end }}{{ i18n "relnote_download_detail" }}
{{ end }} {{ end }} {{ $doc_link := printf "https://istio.io%s/docs" $lang }} {{ if eq $release_location "archive" }} {{ $doc_link = printf "https://archive.istio.io/v%s/docs" $version }} {{ else if eq $release_location "preliminary" }} {{ $doc_link = printf "https://preliminary.istio.io%s/docs" $lang }} {{ else if .Site.Data.args.preliminary }} {{ $doc_link = "https://istio.io/docs" }} {{ end }}{{ i18n "relnote_docs_detail" }}
{{ $helm_changes := .Page.GetPage "./helm-changes" }} {{ if $helm_changes }}{{ i18n "relnote_helm_changes_detail" }}
{{ end }} {{ if $patch }} {{ $old_full_version := printf "%v.%d" $version (sub $patch 1) }} {{ $delta_link := printf "https://github.com/istio/istio/compare/%s...%s" $old_full_version $full_version }}{{ i18n "relnote_source_changes_detail" }}
{{ end }}