mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
[no-relnote] Fix release script
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
fb6a767ada
commit
49acaef503
@ -138,18 +138,19 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: We need to ensure that this tooling also works on `release-*` branches.
|
# TODO: We need to ensure that this tooling also works on `release-*` branches.
|
||||||
if [[ "$FORCE_BRANCH" != "yes" && "$(git rev-parse --abbrev-ref HEAD)" != "main" ]]; then
|
if [[ "$FORCE" != "yes" ]]; then
|
||||||
echo "Release scripts should be run on 'main'"
|
if [[ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]]; then
|
||||||
exit 1
|
echo "Release scripts should be run on 'main'"
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
git fetch
|
git fetch
|
||||||
git diff --quiet FETCH_HEAD
|
git diff --quiet FETCH_HEAD
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Local changes detected:"
|
echo "Local changes detected:"
|
||||||
git diff FETCH_HEAD | cat
|
git diff FETCH_HEAD | cat
|
||||||
echo "Exiting"
|
echo "Exiting"
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a release issue.
|
# Create a release issue.
|
||||||
@ -160,16 +161,21 @@ cat RELEASE.md | sed "s/{{ .VERSION }}/$release/g" | \
|
|||||||
--title "Release nvidia-container-toolkit $release" \
|
--title "Release nvidia-container-toolkit $release" \
|
||||||
--label release
|
--label release
|
||||||
|
|
||||||
|
|
||||||
echo "Creating a version bump branch: bump-release-${release}"
|
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_VERSION=${release%-*}
|
||||||
LIB_TAG=${release#*-}
|
LIB_VERSION=${LIB_VERSION#v}
|
||||||
|
if [[ ${release} == v*-rc.* ]]; then
|
||||||
|
LIB_TAG_STRING=" ${release#*-}"
|
||||||
|
else
|
||||||
|
LIB_TAG_STRING=
|
||||||
|
fi
|
||||||
|
|
||||||
echo Patching versions.mk to refer to $release
|
echo Patching versions.mk to refer to $release
|
||||||
$SED -i "s/^LIB_VERSION.*$/LIB_VERSION := $LIB_VERSION/" versions.mk
|
$SED -i "s/^LIB_VERSION.*$/LIB_VERSION := $LIB_VERSION/" versions.mk
|
||||||
$SED -i "s/^LIB_TAG.*$/LIB_TAG := $LIB_TAG/" versions.mk
|
$SED -i "s/^LIB_TAG.*$/LIB_TAG :=$LIB_TAG_STRING/" 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