Skip to content

Commit 30d9cd0

Browse files
authored
Update build.groovy
1 parent 8d55086 commit 30d9cd0

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/org/devops/build.groovy

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@ package org.devops
22

33
// Node构建命令
44

5-
def Build(){
6-
buildHome = tool "NPM"
7-
8-
// println("${buildHome}")
9-
10-
sh """
11-
${buildHome}/bin/npm install --registry=https://registry.npm.taobao.org
12-
${buildHome}/bin/npm run build:stage
5+
def Build(build){
6+
if ("${build}" == true) {
7+
buildHome = tool "NPM"
8+
sh """
9+
${buildHome}/bin/npm install --registry=https://registry.npm.taobao.org
10+
${buildHome}/bin/npm run build:stage
1311
"""
12+
} else {
13+
println("非编译项目")
14+
}
15+
16+
17+
18+
1419

1520
}

0 commit comments

Comments
 (0)