Use 'new' & 'updated' to build updated_bundle list
Distinction between `new` and `updated` simplifies the process of adding a bundle to the updated_bundle list.
This commit is contained in:
parent
8c4e0a4a31
commit
e999886db5
@ -227,7 +227,7 @@ func! s:sync(bang, bundle) abort
|
|||||||
return 'todate'
|
return 'todate'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call s:add_to_updated_bundle_list(a:bundle)
|
call add(g:updated_bundles, a:bundle)
|
||||||
return 'updated'
|
return 'updated'
|
||||||
endf
|
endf
|
||||||
|
|
||||||
@ -240,14 +240,6 @@ func! s:add_update_tag(bundle) abort
|
|||||||
\ ' && git tag -a vundle_update -m "Last Vundle Update" -f')
|
\ ' && git tag -a vundle_update -m "Last Vundle Update" -f')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func! s:add_to_updated_bundle_list(bundle) abort
|
|
||||||
let current_commit = s:system('cd '.shellescape(a:bundle.path()).' && git rev-list HEAD')
|
|
||||||
let initial_commit = s:system('cd '.shellescape(a:bundle.path()).' && git rev-list vundle_update')
|
|
||||||
if (0 == v:shell_error) && (initial_commit != current_commit)
|
|
||||||
call add(g:updated_bundles, a:bundle)
|
|
||||||
endif
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
func! s:log(str) abort
|
func! s:log(str) abort
|
||||||
let fmt = '%y%m%d %H:%M:%S'
|
let fmt = '%y%m%d %H:%M:%S'
|
||||||
call add(g:vundle_log, '['.strftime(fmt).'] '.a:str)
|
call add(g:vundle_log, '['.strftime(fmt).'] '.a:str)
|
||||||
|
@ -35,15 +35,17 @@ endf
|
|||||||
|
|
||||||
func! s:create_changelog() abort
|
func! s:create_changelog() abort
|
||||||
for bundle in g:updated_bundles
|
for bundle in g:updated_bundles
|
||||||
let update_sha = system('cd '.shellescape(bundle.path()).' && git rev-list -1 vundle_update')[0:9]
|
|
||||||
let updates = system('cd '.shellescape(bundle.path()).
|
let updates = system('cd '.shellescape(bundle.path()).
|
||||||
\ ' && git log --pretty=format:"%s %an, %ar" --graph'.
|
\ ' && git log --pretty=format:"%s %an, %ar" --graph'.
|
||||||
\ ' vundle_update..HEAD')
|
\ ' vundle_update..HEAD')
|
||||||
call add(g:vundle_changelog, '')
|
call add(g:vundle_changelog, '')
|
||||||
call add(g:vundle_changelog, 'Updated Bundle: '.bundle.name)
|
call add(g:vundle_changelog, 'Updated Bundle: '.bundle.name)
|
||||||
|
|
||||||
if bundle.uri =~ "https://github.com"
|
if bundle.uri =~ "https://github.com"
|
||||||
|
let update_sha = system('cd '.shellescape(bundle.path()).' && git rev-list -1 vundle_update')[0:9]
|
||||||
call add(g:vundle_changelog, 'Compare at: '.bundle.uri[0:-5].'/compare/'.update_sha.'...HEAD')
|
call add(g:vundle_changelog, 'Compare at: '.bundle.uri[0:-5].'/compare/'.update_sha.'...HEAD')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
for update in split(updates, '\n')
|
for update in split(updates, '\n')
|
||||||
let update = substitute(update, '\s\+$', '', '')
|
let update = substitute(update, '\s\+$', '', '')
|
||||||
call add(g:vundle_changelog, ' '.update)
|
call add(g:vundle_changelog, ' '.update)
|
||||||
|
Loading…
Reference in New Issue
Block a user