Commit f9478df7 authored by wentao.suo's avatar wentao.suo

fix

parent 024cbe02
...@@ -171,44 +171,44 @@ def checkout_luaui(systemName, branchName) { ...@@ -171,44 +171,44 @@ def checkout_luaui(systemName, branchName) {
gitPath = projectAttr["gitPath"] gitPath = projectAttr["gitPath"]
//0 if project is simple ui not run npm install //0 if project is simple ui not run npm install
def hookfolder = new File( "${currentPath}/.git/hooks" )
def packejson = new File( "${currentPath}/package.json" ) def packejson = new File( "${currentPath}/package.json" )
if(!packejson.exists()){ if(!hookfolder.exists()){
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
sh "mkdir dist"
return if(!packejson.exists()){
} echo ">>>>>>> is simple ui project"
//0------ sh "mkdir dist"
return
def folder = new File( "${currentPath}/.git/hooks" ) } else{
echo ">>>>>>> is node ui project"
def hookExist = folder.exists() def bowerFile = fileExists './bower.json'
if (hookExist){ if (bowerFile) {
sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/" sh "bower install --allow-root"
sh "chmod +x .git/hooks/post-checkout" }
} sh "npm install"
}
}else{
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath if(!packejson.exists()){
echo ">>>>>>> is simple ui project"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath
def nmfolder = new File( "${currentPath}/node_modules" ) sh "mkdir dist"
return
/*if (!nmfolder.exists()){ } else{
sh "mkdir node_modules" echo ">>>>>>> is node ui project"
sh "chmod -R 777 node_modules" sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/"
}*/ sh "chmod +x .git/hooks/post-checkout"
if(!hookExist){ git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath
echo ">>>>>>>>> first git clone"
def bowerFile = fileExists './bower.json'
if (bowerFile) {
sh "bower install --allow-root"
} }
sh "npm install"
} else{ }
echo ">>>>>>>>> not first git clone"
}
} }
def build(buildType,systemName, contextDir){ def build(buildType,systemName, contextDir){
......
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