зеркало из https://github.com/Azure/autorest.php.git
build-source-branch-name
This commit is contained in:
Родитель
805ca27bc5
Коммит
2a96df1278
|
@ -483,6 +483,11 @@ task 'get-tag', '!', (done)->
|
|||
if( global.tag )
|
||||
return done()
|
||||
|
||||
# if branch is provided by environment
|
||||
if( env.BUILD_SOURCEBRANCHNAME )
|
||||
global.tag = if ( env.BUILD_SOURCEBRANCHNAME == "master" || env.BUILD_SOURCEBRANCHNAME =="HEAD" ) then "preview" else env.BUILD_SOURCEBRANCHNAME
|
||||
return done();
|
||||
|
||||
# grab the git branch name.
|
||||
execute "git rev-parse --abbrev-ref HEAD" , {silent:true}, (c,o,e)->
|
||||
o = "preview" if( o == undefined || o == null || o == "" || o.trim() == 'master' || o.trim() == 'HEAD')
|
||||
|
|
Загрузка…
Ссылка в новой задаче