neovim/scripts/release.sh

78 lines
2.6 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
# Performs steps to tag a release.
#
# Steps:
# Create the "release" commit:
# - CMakeLists.txt: Unset NVIM_VERSION_PRERELEASE
# - CMakeLists.txt: Unset NVIM_API_PRERELEASE
2016-04-23 23:00:39 -07:00
# - Tag the commit.
# Create the "version bump" commit:
# - CMakeLists.txt: Set NVIM_VERSION_PRERELEASE to "-dev"
#
# Manual steps:
# - CMakeLists.txt: Bump NVIM_VERSION_* as appropriate.
# - git push --follow-tags
set -e
set -u
set -o pipefail
__sed=$( [ "$(uname)" = Darwin ] && echo 'sed -E' || echo 'sed -r' )
2016-04-23 23:00:39 -07:00
cd "$(git rev-parse --show-toplevel)"
__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}"
$__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
cp build/funcs_data.mpack test/functional/fixtures/api_level_$__API_LEVEL.mpack
git add test/functional/fixtures/api_level_$__API_LEVEL.mpack
fi
2016-04-23 23:00:39 -07:00
echo "Building changelog since ${__LAST_TAG}..."
__CHANGELOG="$(./scripts/git-log-pretty-since.sh "$__LAST_TAG" 'vim-patch:\S')"
2016-04-23 23:00:39 -07:00
git add CMakeLists.txt
git commit --edit -m "${__RELEASE_MSG} ${__CHANGELOG}"
git tag --sign -a v"${__VERSION}" -m "NVIM v${__VERSION}"
2016-04-23 23:00:39 -07:00
$__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
2016-04-23 23:00:39 -07:00
git add CMakeLists.txt
git commit -m "$__BUMP_MSG"
echo "
Next steps:
- Double-check NVIM_VERSION_* in CMakeLists.txt
- git push --follow-tags
- update website: index.html"