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

fix

parent f9478df7
...@@ -178,19 +178,22 @@ def checkout_luaui(systemName, branchName) { ...@@ -178,19 +178,22 @@ def checkout_luaui(systemName, branchName) {
if(!hookfolder.exists()){ if(!hookfolder.exists()){
echo ">>>>>>> first checkout project ${systemName}" echo ">>>>>>> first checkout project ${systemName}"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath
def bowerResult = ext_bower_install()
if(!packejson.exists()){ def npmResult = ext_npm_intall()
def resultNum = bowerResult +resultNum
if(resultNum =0){
echo ">>>>>>> is simple ui project" echo ">>>>>>> is simple ui project"
sh "mkdir dist" sh "mkdir dist"
return return
} else{ } else {
echo ">>>>>>> is node ui project" echo ">>>>>>> is node ui project"
def bowerFile = fileExists './bower.json' def bowerFile = fileExists './bower.json'
if (bowerFile) { if (bowerFile) {
sh "bower install --allow-root" sh "bower install --allow-root"
} }
sh "npm install" sh "npm install"
} }
}else{ }else{
if(!packejson.exists()){ if(!packejson.exists()){
...@@ -211,6 +214,23 @@ def checkout_luaui(systemName, branchName) { ...@@ -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){ def build(buildType,systemName, contextDir){
_utils().beautyEcho("Build +++ type:${buildType} systemName:${systemName}", "info") _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