|
@@ -46,7 +46,7 @@ def call(Map args = [:]) {
|
|
|
sh "scp -o StrictHostKeyChecking=no ${jarPath} ${remoteHost}:${remoteJar}"
|
|
sh "scp -o StrictHostKeyChecking=no ${jarPath} ${remoteHost}:${remoteJar}"
|
|
|
|
|
|
|
|
// 这里的 awk 转义复杂,但 Groovy 编译时没问题,保持不变。
|
|
// 这里的 awk 转义复杂,但 Groovy 编译时没问题,保持不变。
|
|
|
- String remoteMd5 = sh(script: "ssh -o StrictHostKeyChecking=no ${remoteHost} 'md5sum ${remoteJar} | awk \"{print \\$1}\"'", returnStdout: true).trim()
|
|
|
|
|
|
|
+ String remoteMd5 = sh(script: "ssh -o StrictHostKeyChecking=no ${remoteHost} 'md5sum ${remoteJar} | awk \"{print \\\\\$1}\"'", returnStdout: true).trim()
|
|
|
|
|
|
|
|
if (localMd5 != remoteMd5) {
|
|
if (localMd5 != remoteMd5) {
|
|
|
error("MD5 校验失败:本地 ${localMd5} != 远程 ${remoteMd5}")
|
|
error("MD5 校验失败:本地 ${localMd5} != 远程 ${remoteMd5}")
|