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