neovim/scripts/release.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

102 lines
3.3 KiB
Bash
Raw Normal View History

2016-08-21 21:23:48 -07:00
#!/usr/bin/env bash
2016-04-23 23:00:39 -07:00
2018-06-10 23:58:54 -07:00
# Usage:
# ./scripts/release.sh
# ./scripts/release.sh --use-current-commit
# ./scripts/release.sh --only-bump
#
2016-04-23 23:00:39 -07:00
# Performs steps to tag a release.
#
# Steps:
# Create the "release" commit:
# - CMakeLists.txt: Unset NVIM_VERSION_PRERELEASE
# - CMakeLists.txt: Unset NVIM_API_PRERELEASE
NVIM v0.3.0 FEATURES: 3cc7ebf8107b #7234 built-in VimL expression parser 6a7c90464882 #4419 implement <Cmd> key to invoke command in any mode b8363283faac #7679 'startup: treat stdin as text instead of commands' 58b210e1146f :digraphs : highlight with hl-SpecialKey #2690 7a13611ba203 #8276 'startup: Let `-s -` read from stdin' 1e71978cf032 events: VimSuspend, VimResume #8280 1e7d5e8cdf98 #6272 'stdpath()' f96d99ad1118 #8247 server: introduce --listen e8c39f72fdf1 #8226 insert-mode: interpret unmapped META as ESC 98e71123900f msg: do not scroll entire screen (#8088) f72630b78429 #8055 let negative 'writedelay' show all redraws 5d2dd2ebe28c win: has("wsl") on Windows Subsystem for Linux #7330 a4f6cec7a31f cmdline: CmdlineEnter and CmdlineLeave autocommands (#7422) 207b7ca4bc16 #6844 channels: support buffered output and bytes sockets/stdio API: f85cbea725b4 #7917 API: buffer updates 418abfc9d069 #6743 API: list information about all channels/jobs. 36b2e3f743aa #8375 API: nvim_get_commands 273d2cd5d5cf #8329 API: Make nvim_set_option() update `:verbose set …` 8d40b3617c8b #8371 API: more reliable/descriptive VimL errors ebb1acb3c083 #8353 API: nvim_call_dict_function 9f994bb69925 #8004 API: nvim_list_uis 34057045beca #7520 API/UI: forward option updates to UIs 911b1e49abb8 #7821 API: improve nvim_command_output WINDOWS OS: 9cefd83cc7b9 #8084, #8516 build/win: support MSVC ee4e1fd8ecf1 win: Fix reading content from stdin (#8267) TUI: ffb89049131a #8309 TUI: add support for mouse release events in urxvt 8d5a46e77b1e #8081 TUI: implement "standout" attribute 60716371e97d TUI: support TERM=konsole-256color 67848c0b916c #7653 TUI: report TUI info with -V3 ('verbose' >= 3) 3d0ee17c916e TUI/rxvt: enable focus-reporting d109f5645bac #7640 TUI: 'term' option: reflect effective terminal behavior FIXES: ed6a113804a2 #8273 'job-control: avoid kill-timer race' 4e02f1ab871f #8107 'jobs: separate process-group' 451c48a09265 terminal: flush vterm output buffer on pty output #8486 5d6732ff094a :checkhealth fixes #8335 53f11dcfc713 #8218 'Fix errors reported by PVS' d05712fbe7b5 inccommand: pause :terminal redraws (#8307) 51af911a271e inccommand: do not execute trailing commands #8256 84359a467f21 terminal: resize to the max dimensions (#8249) d49c1dda8bf5 #8228 Make vim_fgets() return the same values as in Vim 60e96a45b4f4 screen: winhl=Normal:Background should not override syntax (#8093) 0c59ac1a2c7e #5908 'shada: Also save numbered marks' ba87a2cde779 cscope: ignore EINTR while reading the prompt (#8079) b1412dc412e1 #7971 ':terminal Enter/Leave should not increment jumplist' 3a5721e91ba8 TUI: libtermkey: force CSI driver for mouse input #7948 6ff13d78b7eb #7720 TUI: faster startup 1c6e95607958 #7862 TUI: fix resize-related segfaults a58c9094db0e #7676 TUI: always hide cursor when flushing, never flush buffers during unibilium output 303e1df13f4f #7624 TUI: disable BCE almost always 249bdb07dd3a #7761 mark: Make sure that jumplist item will not have zero lnum 6f41ce026005 #7704 macOS: Set $LANG based on the system locale a043899ba255 #7633 'Retry fgets on EINTR' CHANGES: ad60927d0925 #8304 default to 'nofsync' f3f197059721 #8035 defaults: 'fillchars' a6052c730741 #7984 defaults: sidescroll=1 b69fa866db5b #7888 defaults: enable cscopeverbose 7c4bb23ff38a defaults: do :filetype stuff unless explicitly "off" 2aa308c6852b #5658 'Apply :lmap in macros' 8ce63930484f terminal: Leave 'relativenumber' alone (#8360) e46534b42302 #4486 refactor: Remove maxmem, maxmemtot options 131aad953c00 win: defaults: 'shellcmdflag', 'shellxquote' #7343 c57d31596370 #8031 jobwait(): return -2 on interrupt also with timeout 6452831cf985 clipboard: macOS: fallback to tmux if pbcopy is broken #7940 300d3651e295 #7919 Make 'langnoremap' apply directly after a map ada1956206be #7880 'lua/executor: Remove lightuserdata' INTERNAL: de0a9548f7bf #7806 internal statistics for list impl dee78a4095a2 #7708 rewrite internal list impl
2018-06-10 15:46:49 -07:00
# - Create test/functional/fixtures/api_level_N.mpack
# - Add date and version to runtime/nvim.appdata.xml
2016-04-23 23:00:39 -07:00
# - Tag the commit.
# Create the "version bump" commit:
# - CMakeLists.txt: Set NVIM_VERSION_PRERELEASE to "-dev"
set -e
set -u
set -o pipefail
2018-06-10 23:58:54 -07:00
ARG1=${1:-no}
2017-05-01 12:04:13 -07:00
__sed=$( [ "$(uname)" = Darwin ] && echo 'sed -E' || echo 'sed -r' )
2016-04-23 23:00:39 -07:00
cd "$(git rev-parse --show-toplevel)"
2019-09-14 17:09:29 -07:00
__DATE=$(date +'%Y-%m-%d')
2016-04-23 23:00:39 -07:00
__LAST_TAG=$(git describe --abbrev=0)
[ -z "$__LAST_TAG" ] && { echo 'ERROR: no tag found'; exit 1; }
__VERSION_MAJOR=$(grep 'set(NVIM_VERSION_MAJOR' CMakeLists.txt\
2024-05-15 14:28:20 -07:00
|$__sed 's/.*NVIM_VERSION_MAJOR ([[:digit:]]+).*/\1/')
2016-04-23 23:00:39 -07:00
__VERSION_MINOR=$(grep 'set(NVIM_VERSION_MINOR' CMakeLists.txt\
2024-05-15 14:28:20 -07:00
|$__sed 's/.*NVIM_VERSION_MINOR ([[:digit:]]+).*/\1/')
2016-04-23 23:00:39 -07:00
__VERSION_PATCH=$(grep 'set(NVIM_VERSION_PATCH' CMakeLists.txt\
2024-05-15 14:28:20 -07:00
|$__sed 's/.*NVIM_VERSION_PATCH ([[:digit:]]+).*/\1/')
2016-04-23 23:00:39 -07:00
__VERSION="${__VERSION_MAJOR}.${__VERSION_MINOR}.${__VERSION_PATCH}"
__API_LEVEL=$(grep 'set(NVIM_API_LEVEL ' CMakeLists.txt\
2024-05-15 14:28:20 -07:00
|$__sed 's/.*NVIM_API_LEVEL ([[:digit:]]+).*/\1/')
2016-04-23 23:00:39 -07:00
{ [ -z "$__VERSION_MAJOR" ] || [ -z "$__VERSION_MINOR" ] || [ -z "$__VERSION_PATCH" ]; } \
&& { echo "ERROR: version parse failed: '${__VERSION}'"; exit 1; }
__RELEASE_MSG="NVIM v${__VERSION}
"
__BUMP_MSG="version bump"
echo "Most recent tag: ${__LAST_TAG}"
echo "Release version: ${__VERSION}"
_git_log_pretty() {
git cliff --config scripts/cliff.toml --unreleased || echo 'git cliff failed'
}
2018-06-10 23:58:54 -07:00
_do_release_commit() {
$__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"
VIMRUNTIME=./runtime build/bin/nvim -u NONE -l scripts/gen_vimdoc.lua
git add -u -- runtime/doc/
2018-06-10 23:58:54 -07:00
fi
2017-05-01 12:04:13 -07:00
$__sed -i.bk 's,(<releases>),\1\
<release date="'"${__DATE}"'" version="'"${__VERSION}"'"/>,' runtime/nvim.appdata.xml
git add runtime/nvim.appdata.xml
2018-06-10 23:58:54 -07:00
if ! test "$ARG1" = '--use-current-commit' ; then
echo "Building changelog since ${__LAST_TAG}..."
2016-04-23 23:00:39 -07:00
2018-06-10 23:58:54 -07:00
git add CMakeLists.txt
(echo "${__RELEASE_MSG}"; _git_log_pretty) | git commit --edit -F -
2018-06-10 23:58:54 -07:00
fi
2016-04-23 23:00:39 -07:00
2018-06-10 23:58:54 -07:00
git tag --sign -a v"${__VERSION}" -m "NVIM v${__VERSION}"
}
2018-06-10 23:58:54 -07:00
_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
2021-09-26 08:56:50 -07:00
rm -f CMakeLists.txt.bk
rm -f runtime/nvim.appdata.xml.bk
2019-09-15 16:34:31 -07:00
nvim +'/NVIM_VERSION' +1new +'exe "norm! iUpdate version numbers!!!"' \
-O CMakeLists.txt
2019-09-14 17:09:29 -07:00
git add CMakeLists.txt
2018-06-10 23:58:54 -07:00
git commit -m "$__BUMP_MSG"
}
2017-11-18 04:44:03 -07:00
2018-06-10 23:58:54 -07:00
if ! test "$ARG1" = '--only-bump' ; then
_do_release_commit
fi
_do_bump_commit
2016-04-23 23:00:39 -07:00
echo "
Next steps:
2019-09-15 23:08:40 -07:00
- Run tests/CI (version_spec.lua)!
2019-01-13 07:21:24 -07:00
- Push the tag:
git push --follow-tags
- Update website: index.html"