vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit 0629b39815c97f1e4ee31e26faa6891b0e13d2d5
parent 221377f4fae9656f7b8852fef1f2a5a1871b9968
Author: Brennen Bearnes <code@p1k3.com>
Date:   Fri,  2 Dec 2022 14:39:25 -0700

switch to calver; add g:vimwiki_version; tidy version hardcoding

Setting a global for g:vimwiki_version doesn't seem too egregious, and
lets us reference it cleanly elsewhere.

Removes version header from vimwiki.txt and hardcoding in tagfile
generation.

There's still one instance of that left in test/tag.vader that we should
clean up eventually.

Diffstat:
MCONTRIBUTING.md | 22++++++++++++++--------
Mautoload/vimwiki/tags.vim | 3+--
Mdoc/vimwiki.txt | 16++++++++--------
Mplugin/vimwiki.vim | 4++--
Mtest/tag.vader | 2+-
5 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -10,11 +10,13 @@ Issues can be filed at https://github.com/vimwiki/vimwiki/issues/ # Git branching model -As of v2.6.0, VimWiki has adopted a rolling release model, while (for the -moment) retaining specific version numbers. A release should be +As of v2022.12.02, VimWiki has adopted a rolling release model, along with +[calendar versioning][calver]. A release should be [prepared][#preparing-a-release] for every change or set of changes which merge to `dev`. +[calver]: https://calver.org/ + There are two permanent branches: 1. `dev`: This is the default branch, and where changes are released. Tasks which are done in one or only a few commits go here directly. Always @@ -34,11 +36,13 @@ not from the `master` branch. Version bureaucracy: -1. Pick a new version number according to [semver][semver] rules: - `git tag vMAJOR.MINOR.PATCH` -2. Update the version number at the top of `doc/vimwiki.txt` -3. Update the version number at the top of `plugin/vimwiki.vim` -4. Update the version number in `autoload/vimwiki/tags.vim` +1. Pick a new version number according to the current date: + `YYYY.MM.DD` (if releasing a second version for the + current date, append a `_MICRO` version such as `_1`, `_2`, etc. + - Examples: `2022.12.22`, `2022.12.22_1` +2. Update the version number at the top of `plugin/vimwiki.vim` +3. Update the `!_TAG_PROGRAM_VERSION` expected in `test/tag.vader` + (this is a bit silly, will have to figure out how to get rid of it) Update `doc/vimwiki.txt` with the following information: @@ -51,7 +55,9 @@ Update `doc/vimwiki.txt` with the following information: # Preparing a release -1. Set a tag with the version number in Git. +This section is primarily for maintainers. + +1. Set a tag with the version number in Git: `git tag -a v2022.12.02 -m 'Release v2022.12.02'` 2. `git push --tags` 3. In GitHub, go to _Releases_ -> _Draft a new release_ -> choose the tag, convert the changelog from the doc to Markdown and post it there. Make diff --git a/autoload/vimwiki/tags.vim b/autoload/vimwiki/tags.vim @@ -292,9 +292,8 @@ function! s:write_tags_metadata(metadata) abort endfor endfor call sort(tags, 's:tags_entry_cmp') - " TODO: VimWiki version probably shouldn't be hardcoded here: let tag_comments = [ - \ "!_TAG_PROGRAM_VERSION\t2.6.0", + \ "!_TAG_PROGRAM_VERSION\t" . g:vimwiki_version, \ "!_TAG_PROGRAM_URL\thttps://github.com/vimwiki/vimwiki", \ "!_TAG_PROGRAM_NAME\tVimwiki Tags", \ "!_TAG_PROGRAM_AUTHOR\tVimwiki", diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt @@ -8,9 +8,6 @@ | | | | | ||_|| || _ || | | _ || | ~ |___| |___| |_| |_||__| |__||___| |___| |_||___| ~ - - Version: 2.6.0 - ============================================================================== CONTENTS *vimwiki* @@ -3995,14 +3992,17 @@ https://github.com/vimwiki/vimwiki/issues/, all others from http://code.google.com/p/vimwiki/issues/list. They may be accessible from https://github.com/vimwiki-backup/vimwiki/issues. -From version 2.6.0, the VimWiki project has adopted a rolling release policy. -Once changes are accepted, they will merge directly to dev, which is now the -main branch. master is retained as a legacy mirror of the dev branch. +From version 2022.12.02, what would have been 2.6.0 under the prior versioning +scheme, the VimWiki project has adopted a rolling release policy. Once changes +are accepted, they will merge directly to dev, which is now the main branch. +master is retained as a legacy mirror of the dev branch. + +This is somewhat experimental, and will probably be refined over time. -2.6.0 (2022-11-28)~ +2022.12.02~ New:~ - * Policy: #1235: Move to semver and rolling release cadence + * Policy: #1235: Move to calendar versioning and rolling release cadence * Feature: #238: Reuse existing tabs with tab drop * Issue #621: Feature request: Highlight code listings in HTML * Issue #290: Calendar plugin, do not sign if no wiki diff --git a/plugin/vimwiki.vim b/plugin/vimwiki.vim @@ -11,7 +11,7 @@ endif let g:loaded_vimwiki = 1 " Set to version number for release: -let s:plugin_vers = '2.6.0' +let g:vimwiki_version = '2022.12.02' " Get the directory the script is installed in let s:plugin_dir = expand('<sfile>:p:h:h') @@ -209,7 +209,7 @@ endfunction " Echo vimwiki version " Called by :VimwikiShowVersion function! s:get_version() abort - echo 'Version: ' . s:plugin_vers + echo 'Version: ' . g:vimwiki_version let l:plugin_rev = system('git --git-dir ' . s:plugin_dir . '/.git rev-parse --short HEAD') let l:plugin_branch = system('git --git-dir ' . s:plugin_dir . '/.git rev-parse --abbrev-ref HEAD') let l:plugin_date = system('git --git-dir ' . s:plugin_dir . '/.git show -s --format=%ci') diff --git a/test/tag.vader b/test/tag.vader @@ -159,7 +159,7 @@ Expect (Correctly formatted tags file): !_TAG_PROGRAM_AUTHOR Vimwiki !_TAG_PROGRAM_NAME Vimwiki Tags !_TAG_PROGRAM_URL https://github.com/vimwiki/vimwiki - !_TAG_PROGRAM_VERSION 2.6.0 + !_TAG_PROGRAM_VERSION 2022.12.02 second-tag Test-Tag.md 13;" vimwiki:Test-Tag\tTest-Tag#second-tag\tTest-Tag#second-tag test-tag Test-Tag.md 5;" vimwiki:Test-Tag\tTest-Tag#a-header\tA header top-tag Test-Tag.md 1;" vimwiki:Test-Tag\tTest-Tag\tTest-Tag