mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
[no-relnote] Fix version bump in release script
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
0eec445d7a
commit
976fdae5d0
@ -30,7 +30,12 @@ Options:
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
VERSION=""
|
LIB_VERSION=$(awk -F= '/^LIB_VERSION/ { print $2 }' versions.mk | tr -d '[:space:]')
|
||||||
|
LIB_TAG=$(awk -F= '/^LIB_TAG/ { print $2 }' versions.mk | tr -d '[:space:]')
|
||||||
|
|
||||||
|
VERSION="v${LIB_VERSION}${LIB_TAG+-${LIB_TAG}}"
|
||||||
|
>&2 echo "VERSION=$VERSION"
|
||||||
|
|
||||||
REFERENCE=
|
REFERENCE=
|
||||||
|
|
||||||
# Parse command line options
|
# Parse command line options
|
||||||
@ -74,9 +79,9 @@ fi
|
|||||||
>&2 echo "Using ${REFERENCE} as previous version"
|
>&2 echo "Using ${REFERENCE} as previous version"
|
||||||
|
|
||||||
# Print the changelog
|
# Print the changelog
|
||||||
echo "## Changelog"
|
echo "# Changelog"
|
||||||
echo ""
|
echo ""
|
||||||
echo "### Version $VERSION"
|
echo "## $VERSION"
|
||||||
|
|
||||||
# Iterate over the commit messages and ignore the ones that start with "Merge" or "Bump"
|
# Iterate over the commit messages and ignore the ones that start with "Merge" or "Bump"
|
||||||
git log --pretty=format:"%s" $REFERENCE..@ | grep -Ev "(^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed 's/^\(.*\)/- \1/g'
|
git log --pretty=format:"%s" $REFERENCE..@ | grep -Ev "(^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed 's/^\(.*\)/- \1/g'
|
||||||
|
@ -165,8 +165,11 @@ echo "Creating a version bump branch: bump-release-${release}"
|
|||||||
git checkout -f -b bump-release-${release}
|
git checkout -f -b bump-release-${release}
|
||||||
|
|
||||||
# Patch versions.mk
|
# Patch versions.mk
|
||||||
|
LIB_VERSION=${${release%-*}#v}
|
||||||
|
LIB_TAG=${release#*-}
|
||||||
echo Patching versions.mk to refer to $release
|
echo Patching versions.mk to refer to $release
|
||||||
$SED -i "s/^VERSION.*$/VERSION ?= $release/" versions.mk
|
$SED -i "s/^LIB_VERSION.*$/LIB_VERSION := $LIB_VERSION/" versions.mk
|
||||||
|
$SED -i "s/^LIB_TAG.*$/LIB_TAG := $LIB_TAG/" versions.mk
|
||||||
|
|
||||||
git add versions.mk
|
git add versions.mk
|
||||||
git commit -s -m "Bump version for $release release"
|
git commit -s -m "Bump version for $release release"
|
||||||
|
Loading…
Reference in New Issue
Block a user