From 6dbcbc54eec3d054ba8c4bde113d52fbeea42a9f Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Fri, 10 Feb 2023 11:36:58 +0100 Subject: [PATCH] .github: fix URL of docker release notes Now that the upstream Docker release notes website has changed its structure, the URL for Docker release notes started to have a specific format of https://docs.docker.com/engine/release-notes/MAJOR.MINOR/#COMBINEDFULLVERSION. Fix the URL to make it work correctly. --- .../.github/workflows/docker-apply-patch.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh index 262e823e57..4152c28b6d 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/docker-apply-patch.sh @@ -49,9 +49,17 @@ sed -i "s/github.com\/docker\/docker-ce\/blob\/v${VERSION_OLD}/github.com\/docke popd >/dev/null || exit -# drop all dots +# URL for Docker release notes has a specific format of +# https://docs.docker.com/engine/release-notes/MAJOR.MINOR/#COMBINEDFULLVERSION +# To get the subfolder part MAJOR.MINOR, drop the patchlevel of the semver. +# e.g. 20.10.23 -> 20.10 +# To get the combined full version, drop all dots from the full version. +# e.g. 20.10.23 -> 201023 +# So the result becomes like: +# https://docs.docker.com/engine/release-notes/20.10/#201023 +URLSUBFOLDER=${VERSION_NEW%.*} URLVERSION="${VERSION_NEW//./}" -URL="https://docs.docker.com/engine/release-notes/#${URLVERSION}" +URL="https://docs.docker.com/engine/release-notes/${URLSUBFOLDER}/#${URLVERSION}" generate_update_changelog 'Docker' "${VERSION_NEW}" "${URL}" 'docker'