neovim/scripts/release.sh

102 lines
3.2 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\
|$__sed 's/.*NVIM_VERSION_MAJOR ([[:digit:]]).*/\1/')
2016-04-23 23:00:39 -07:00
__VERSION_MINOR=$(grep 'set(NVIM_VERSION_MINOR' CMakeLists.txt\
|$__sed 's/.*NVIM_VERSION_MINOR ([[:digit:]]).*/\1/')
2016-04-23 23:00:39 -07:00
__VERSION_PATCH=$(grep 'set(NVIM_VERSION_PATCH' CMakeLists.txt\
|$__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\
|$__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}
NVIM v0.1.6 FEATURES: 0b5a7e4ad5ee #4432 API: external UIs can render custom popupmenu c6ac4f84b163 #4934 API: call any API method from vimscript 31df051ed9a3 #4568 API: nvim_call_atomic(): multiple calls in a single request b268ba353af4 #5424 API: nvim_win_get_number(), nvim_tabpage_get_number() e7e2844d468d has("nvim-1.2.3") checks for a specific Nvim version 522b885a0db7 #5295, #5493 `:CheckHealth` checks tmux, terminfo, performance 719dae2e010c #5384 events: allow event processing in getchar() f25797f86976 #5386 API: metadata: Nvim version & API level 22dfe6925d47 #5389 API: metadata: "since", "deprecated_since" 605e74327a40 Added QuickFixLine highlight group CHANGES: 4af6ec746c82 #5253 perf: Disable clipboard in do_cmdline() 6e9f329d051c #5299 perf: Skip foldUpdate() in insert-mode. 9d4fcec7c6b6 #5426 perf: Do not auto-update folds for some foldmethods. eeec0cab5848 #5419 tui: Default to normal-mode cursor shape. FIXES: e83845285cf3 #5436 tui: Fix "weird characters" / "bleeding termcodes" 10a54ad12e2d #5243 signal_init: Always unblock SIGCHLD. bccb49bedb9b #5316 eval.c: Fix memory leak for detached pty job 626065d385c4 #5227 tchdir: New tab should inherit CWD. cd321b7d0fb1 #5292 getcwd(): Return empty string if CWD is invalid. 6127eaef0534 shada: Fix non-writeable ShaDa directory handling ca65514a241b #2789 system(): Respect shellxescape, shellxquote 2daf54ee8dd9 #4874 Restore vim-like tab dragging 0c536b5d8afe #5319 syntax.c: Support bg/fg special color-names. 3c53371b0ccb #4972 from justinmk/schedule-ui_refresh 68bcb32ec43e #4789 tui.c: Do not wait for tui loop on teardown. c8b6ec2e6a85 #5409 v:count broken in command-line window 6bc3bcefc6ca #5461 fix emoji display 51937e1322de #5470 fix :terminal with :argadd, :argu 79d77da8a06b #5481 external UIs: opening multiple files from command-line 657ba62a84de #5501 rplugin: resolve paths in manifest file 6a6f188d2ac4 #5502 system('foo &', 'bar'): Show error, don't crash. 1ff162c0d99c #5515 os_nodetype: open fd with O_NONBLOCK 2a6c5bb0c4b0 #5450 modeline: Handle version number overflow. 0ade1bb7067d #5225 CI tests now run against Windows!
2016-10-28 06:01:24 -07:00
FEATURES:
2016-04-23 23:00:39 -07:00
NVIM v0.1.6 FEATURES: 0b5a7e4ad5ee #4432 API: external UIs can render custom popupmenu c6ac4f84b163 #4934 API: call any API method from vimscript 31df051ed9a3 #4568 API: nvim_call_atomic(): multiple calls in a single request b268ba353af4 #5424 API: nvim_win_get_number(), nvim_tabpage_get_number() e7e2844d468d has("nvim-1.2.3") checks for a specific Nvim version 522b885a0db7 #5295, #5493 `:CheckHealth` checks tmux, terminfo, performance 719dae2e010c #5384 events: allow event processing in getchar() f25797f86976 #5386 API: metadata: Nvim version & API level 22dfe6925d47 #5389 API: metadata: "since", "deprecated_since" 605e74327a40 Added QuickFixLine highlight group CHANGES: 4af6ec746c82 #5253 perf: Disable clipboard in do_cmdline() 6e9f329d051c #5299 perf: Skip foldUpdate() in insert-mode. 9d4fcec7c6b6 #5426 perf: Do not auto-update folds for some foldmethods. eeec0cab5848 #5419 tui: Default to normal-mode cursor shape. FIXES: e83845285cf3 #5436 tui: Fix "weird characters" / "bleeding termcodes" 10a54ad12e2d #5243 signal_init: Always unblock SIGCHLD. bccb49bedb9b #5316 eval.c: Fix memory leak for detached pty job 626065d385c4 #5227 tchdir: New tab should inherit CWD. cd321b7d0fb1 #5292 getcwd(): Return empty string if CWD is invalid. 6127eaef0534 shada: Fix non-writeable ShaDa directory handling ca65514a241b #2789 system(): Respect shellxescape, shellxquote 2daf54ee8dd9 #4874 Restore vim-like tab dragging 0c536b5d8afe #5319 syntax.c: Support bg/fg special color-names. 3c53371b0ccb #4972 from justinmk/schedule-ui_refresh 68bcb32ec43e #4789 tui.c: Do not wait for tui loop on teardown. c8b6ec2e6a85 #5409 v:count broken in command-line window 6bc3bcefc6ca #5461 fix emoji display 51937e1322de #5470 fix :terminal with :argadd, :argu 79d77da8a06b #5481 external UIs: opening multiple files from command-line 657ba62a84de #5501 rplugin: resolve paths in manifest file 6a6f188d2ac4 #5502 system('foo &', 'bar'): Show error, don't crash. 1ff162c0d99c #5515 os_nodetype: open fd with O_NONBLOCK 2a6c5bb0c4b0 #5450 modeline: Handle version number overflow. 0ade1bb7067d #5225 CI tests now run against Windows!
2016-10-28 06:01:24 -07:00
FIXES:
2016-04-23 23:00:39 -07:00
NVIM v0.1.6 FEATURES: 0b5a7e4ad5ee #4432 API: external UIs can render custom popupmenu c6ac4f84b163 #4934 API: call any API method from vimscript 31df051ed9a3 #4568 API: nvim_call_atomic(): multiple calls in a single request b268ba353af4 #5424 API: nvim_win_get_number(), nvim_tabpage_get_number() e7e2844d468d has("nvim-1.2.3") checks for a specific Nvim version 522b885a0db7 #5295, #5493 `:CheckHealth` checks tmux, terminfo, performance 719dae2e010c #5384 events: allow event processing in getchar() f25797f86976 #5386 API: metadata: Nvim version & API level 22dfe6925d47 #5389 API: metadata: "since", "deprecated_since" 605e74327a40 Added QuickFixLine highlight group CHANGES: 4af6ec746c82 #5253 perf: Disable clipboard in do_cmdline() 6e9f329d051c #5299 perf: Skip foldUpdate() in insert-mode. 9d4fcec7c6b6 #5426 perf: Do not auto-update folds for some foldmethods. eeec0cab5848 #5419 tui: Default to normal-mode cursor shape. FIXES: e83845285cf3 #5436 tui: Fix "weird characters" / "bleeding termcodes" 10a54ad12e2d #5243 signal_init: Always unblock SIGCHLD. bccb49bedb9b #5316 eval.c: Fix memory leak for detached pty job 626065d385c4 #5227 tchdir: New tab should inherit CWD. cd321b7d0fb1 #5292 getcwd(): Return empty string if CWD is invalid. 6127eaef0534 shada: Fix non-writeable ShaDa directory handling ca65514a241b #2789 system(): Respect shellxescape, shellxquote 2daf54ee8dd9 #4874 Restore vim-like tab dragging 0c536b5d8afe #5319 syntax.c: Support bg/fg special color-names. 3c53371b0ccb #4972 from justinmk/schedule-ui_refresh 68bcb32ec43e #4789 tui.c: Do not wait for tui loop on teardown. c8b6ec2e6a85 #5409 v:count broken in command-line window 6bc3bcefc6ca #5461 fix emoji display 51937e1322de #5470 fix :terminal with :argadd, :argu 79d77da8a06b #5481 external UIs: opening multiple files from command-line 657ba62a84de #5501 rplugin: resolve paths in manifest file 6a6f188d2ac4 #5502 system('foo &', 'bar'): Show error, don't crash. 1ff162c0d99c #5515 os_nodetype: open fd with O_NONBLOCK 2a6c5bb0c4b0 #5450 modeline: Handle version number overflow. 0ade1bb7067d #5225 CI tests now run against Windows!
2016-10-28 06:01:24 -07:00
CHANGES:
2016-04-23 23:00:39 -07:00
"
__BUMP_MSG="version bump"
echo "Most recent tag: ${__LAST_TAG}"
echo "Release version: ${__VERSION}"
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"
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}"; ./scripts/git-log-pretty-since.sh "$__LAST_TAG" 'vim-patch:[^[:space:]]') | 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"