mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 02:10:05 +08:00
Add nightly release func
This commit is contained in:
parent
0f79d54f39
commit
b79c231516
@ -1,13 +1,17 @@
|
|||||||
|
function! s:body() abort
|
||||||
|
return 'SpaceVim development (pre-release:' . g:spacevim_version . ') build.'
|
||||||
|
endfunction
|
||||||
function! SpaceVim#dev#releases#open() abort
|
function! SpaceVim#dev#releases#open() abort
|
||||||
let username = input('github username:')
|
let username = input('github username:')
|
||||||
let password = input('github password:')
|
let password = input('github password:')
|
||||||
|
let is_dev = g:spacevim_version =~ 'dev'
|
||||||
let releases = {
|
let releases = {
|
||||||
\ 'tag_name': g:spacevim_version,
|
\ 'tag_name': (is_dev ? 'nightly' : g:spacevim_version),
|
||||||
\ 'target_commitish': 'dev',
|
\ 'target_commitish': 'dev',
|
||||||
\ 'name': 'SpaceVim v' . g:spacevim_version,
|
\ 'name': (is_dev ? 'nightly' : 'SpaceVim v' . g:spacevim_version),
|
||||||
\ 'body': SpaceVim#dev#releases#content(),
|
\ 'body': (is_dev ? s:body() : SpaceVim#dev#releases#content()),
|
||||||
\ 'draft': v:false,
|
\ 'draft': v:false,
|
||||||
\ 'prerelease': v:false
|
\ 'prerelease': (is_dev ? v:true : v:false)
|
||||||
\ }
|
\ }
|
||||||
let response = github#api#repos#releases#Create('SpaceVim', 'SpaceVim',
|
let response = github#api#repos#releases#Create('SpaceVim', 'SpaceVim',
|
||||||
\ username, password, releases)
|
\ username, password, releases)
|
||||||
|
Loading…
Reference in New Issue
Block a user