Commit 81152a69 authored by wentao.suo's avatar wentao.suo

fix

parent f9478df7
......@@ -178,19 +178,22 @@ def checkout_luaui(systemName, branchName) {
if(!hookfolder.exists()){
echo ">>>>>>> first checkout project ${systemName}"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath
if(!packejson.exists()){
def bowerResult = ext_bower_install()
def npmResult = ext_npm_intall()
def resultNum = bowerResult +resultNum
if(resultNum =0){
echo ">>>>>>> is simple ui project"
sh "mkdir dist"
return
} else{
} else {
echo ">>>>>>> is node ui project"
def bowerFile = fileExists './bower.json'
if (bowerFile) {
sh "bower install --allow-root"
}
sh "npm install"
}
}
}else{
if(!packejson.exists()){
......@@ -211,6 +214,23 @@ def checkout_luaui(systemName, branchName) {
}
def ext_bower_install(){
def bowerFile = fileExists './bower.json'
if(bowerFile){
sh "bower install --allow-root"
return 1
}
return 0
}
def ext_npm_intall(){
def packageFile = fileExists './package.json'
if(packageFile){
sh "npm install"
return 1
}
return 0
}
def build(buildType,systemName, contextDir){
_utils().beautyEcho("Build +++ type:${buildType} systemName:${systemName}", "info")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment