@@ -66,10 +66,9 @@ remote=$( git remote -v | grep -E "NVIDIA/nvidia-container-toolkit(\.git)?\s" |
6666>&2 echo " Detected remote as '${remote} '"
6767git fetch ${remote} --tags
6868
69- git tag | grep ${VERSION} > /dev/null
69+ SHA= $( git rev-parse ${VERSION} )
7070if [[ $? -ne 0 ]]; then
71- >&2 echo " ${VERSION} is not a valid git reference, using HEAD"
72- VERSION=HEAD
71+ SHA=" HEAD"
7372fi
7473
7574# if REFERENCE is not set, get the latest tag
8786# Print the changelog
8887echo " ## What's Changed"
8988echo " "
89+ if [[ ${VERSION} != v* -rc.* ]]; then
90+ echo " - Promote $REFERENCE to $VERSION "
91+ fi
92+
9093# Iterate over the commit messages and ignore the ones that start with "Merge" or "Bump"
91- git log --pretty=format:" %s" $REFERENCE ..$VERSION -- ' :!deployments/container' ' :!tools' | grep -Ev " (^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed ' s/^\(.*\)/- \1/g'
94+ git log --pretty=format:" %s" $REFERENCE ..$SHA -- ' :!deployments/container' ' :!tools' | grep -Ev " (^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed ' s/^\(.*\)/- \1/g'
9295
9396echo " "
9497echo " ### Changes in the Toolkit Container"
9598echo " "
96- git log --pretty=format:" %s" $REFERENCE ..$VERSION -- deployments/container tools | grep -Ev " (^Merge )|(no-rel-?note)|(^---)" | sed ' s/^\(.*\)/- \1/g'
99+ git log --pretty=format:" %s" $REFERENCE ..$SHA -- deployments/container tools | grep -Ev " (^Merge )|(no-rel-?note)|(^---)" | sed ' s/^\(.*\)/- \1/g'
97100
98101LIB_NVIDIA_CONTAINER_REFERENCE=$( git ls-tree $REFERENCE third_party/libnvidia-container --object-only )
99- LIB_NVIDIA_CONTAINER_VERSION=$( git ls-tree $VERSION third_party/libnvidia-container --object-only )
102+ LIB_NVIDIA_CONTAINER_VERSION=$( git ls-tree $SHA third_party/libnvidia-container --object-only )
100103
101104echo " "
102105if [[ $( git -C third_party/libnvidia-container log --pretty=format:" %s" $LIB_NVIDIA_CONTAINER_REFERENCE ..$LIB_NVIDIA_CONTAINER_VERSION | grep -Ev " (^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed ' s/^\(.*\)/- \1/g' | wc -l) -gt 0 ]]; then
103106echo " ### Changes in libnvidia-container"
104107echo " "
105108git -C third_party/libnvidia-container log --pretty=format:" %s" $LIB_NVIDIA_CONTAINER_REFERENCE ..$LIB_NVIDIA_CONTAINER_VERSION | grep -Ev " (^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed ' s/^\(.*\)/- \1/g'
109+ echo " "
106110fi
107111
108- echo " "
109112echo " **Full Changelog**: https://github.com/NVIDIA/nvidia-container-toolkit/compare/${REFERENCE} ...${VERSION} "
110113echo " "
0 commit comments