mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
version bump
This commit is contained in:
@@ -75,8 +75,8 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
|||||||
# version string, else they are combined with the result of `git describe`.
|
# version string, else they are combined with the result of `git describe`.
|
||||||
set(NVIM_VERSION_MAJOR 0)
|
set(NVIM_VERSION_MAJOR 0)
|
||||||
set(NVIM_VERSION_MINOR 3)
|
set(NVIM_VERSION_MINOR 3)
|
||||||
set(NVIM_VERSION_PATCH 0)
|
set(NVIM_VERSION_PATCH 1)
|
||||||
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
|
set(NVIM_VERSION_PRERELEASE "-dev") # for package maintainers
|
||||||
|
|
||||||
# API level
|
# API level
|
||||||
set(NVIM_API_LEVEL 4) # Bump this after any API change.
|
set(NVIM_API_LEVEL 4) # Bump this after any API change.
|
||||||
|
@@ -1,5 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
# ./scripts/release.sh
|
||||||
|
# ./scripts/release.sh --use-current-commit
|
||||||
|
# ./scripts/release.sh --only-bump
|
||||||
|
#
|
||||||
# Performs steps to tag a release.
|
# Performs steps to tag a release.
|
||||||
#
|
#
|
||||||
# Steps:
|
# Steps:
|
||||||
@@ -19,7 +24,7 @@ set -e
|
|||||||
set -u
|
set -u
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
USE_CURRENT_COMMIT=${1:-no}
|
ARG1=${1:-no}
|
||||||
|
|
||||||
__sed=$( [ "$(uname)" = Darwin ] && echo 'sed -E' || echo 'sed -r' )
|
__sed=$( [ "$(uname)" = Darwin ] && echo 'sed -E' || echo 'sed -r' )
|
||||||
|
|
||||||
@@ -51,33 +56,42 @@ __BUMP_MSG="version bump"
|
|||||||
|
|
||||||
echo "Most recent tag: ${__LAST_TAG}"
|
echo "Most recent tag: ${__LAST_TAG}"
|
||||||
echo "Release version: ${__VERSION}"
|
echo "Release version: ${__VERSION}"
|
||||||
$__sed -i.bk 's/(NVIM_VERSION_PRERELEASE) "-dev"/\1 ""/' CMakeLists.txt
|
|
||||||
if grep '(NVIM_API_PRERELEASE true)' CMakeLists.txt > /dev/null; then
|
|
||||||
$__sed -i.bk 's/(NVIM_API_PRERELEASE) true/\1 false/' CMakeLists.txt
|
|
||||||
build/bin/nvim --api-info > test/functional/fixtures/api_level_$__API_LEVEL.mpack
|
|
||||||
git add test/functional/fixtures/api_level_$__API_LEVEL.mpack
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! test "$USE_CURRENT_COMMIT" = 'use-current-commit' ; then
|
_do_release_commit() {
|
||||||
echo "Building changelog since ${__LAST_TAG}..."
|
$__sed -i.bk 's/(NVIM_VERSION_PRERELEASE) "-dev"/\1 ""/' CMakeLists.txt
|
||||||
__CHANGELOG="$(./scripts/git-log-pretty-since.sh "$__LAST_TAG" 'vim-patch:\S')"
|
if grep '(NVIM_API_PRERELEASE true)' CMakeLists.txt > /dev/null; then
|
||||||
|
$__sed -i.bk 's/(NVIM_API_PRERELEASE) true/\1 false/' CMakeLists.txt
|
||||||
|
build/bin/nvim --api-info > test/functional/fixtures/api_level_$__API_LEVEL.mpack
|
||||||
|
git add test/functional/fixtures/api_level_$__API_LEVEL.mpack
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! test "$ARG1" = '--use-current-commit' ; then
|
||||||
|
echo "Building changelog since ${__LAST_TAG}..."
|
||||||
|
__CHANGELOG="$(./scripts/git-log-pretty-since.sh "$__LAST_TAG" 'vim-patch:\S')"
|
||||||
|
|
||||||
|
git add CMakeLists.txt
|
||||||
|
git commit --edit -m "${__RELEASE_MSG} ${__CHANGELOG}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
git tag --sign -a v"${__VERSION}" -m "NVIM v${__VERSION}"
|
||||||
|
}
|
||||||
|
|
||||||
|
_do_bump_commit() {
|
||||||
|
$__sed -i.bk 's/(NVIM_VERSION_PRERELEASE) ""/\1 "-dev"/' CMakeLists.txt
|
||||||
|
$__sed -i.bk 's/set\((NVIM_VERSION_PATCH) [[:digit:]]/set(\1 ?/' CMakeLists.txt
|
||||||
|
nvim +'/NVIM_VERSION' +10new +'exe "norm! iUpdate version numbers!!!\<CR>"' \
|
||||||
|
+'norm! 10.' CMakeLists.txt
|
||||||
|
|
||||||
git add CMakeLists.txt
|
git add CMakeLists.txt
|
||||||
git commit --edit -m "${__RELEASE_MSG} ${__CHANGELOG}"
|
git commit -m "$__BUMP_MSG"
|
||||||
|
|
||||||
|
rm CMakeLists.txt.bk || true
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! test "$ARG1" = '--only-bump' ; then
|
||||||
|
_do_release_commit
|
||||||
fi
|
fi
|
||||||
|
_do_bump_commit
|
||||||
git tag --sign -a v"${__VERSION}" -m "NVIM v${__VERSION}"
|
|
||||||
|
|
||||||
$__sed -i.bk 's/(NVIM_VERSION_PRERELEASE) ""/\1 "-dev"/' CMakeLists.txt
|
|
||||||
$__sed -i.bk 's/set\((NVIM_VERSION_PATCH) [[:digit:]]/set(\1 ?/' CMakeLists.txt
|
|
||||||
nvim +'/NVIM_VERSION' +10new +'exe "norm! iUpdate version numbers!!!\<CR>"' \
|
|
||||||
+'norm! 10.' CMakeLists.txt
|
|
||||||
|
|
||||||
git add CMakeLists.txt
|
|
||||||
git commit -m "$__BUMP_MSG"
|
|
||||||
|
|
||||||
rm CMakeLists.txt.bk || true
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
Next steps:
|
Next steps:
|
||||||
- Double-check NVIM_VERSION_* in CMakeLists.txt
|
- Double-check NVIM_VERSION_* in CMakeLists.txt
|
||||||
|
Reference in New Issue
Block a user