cob-cli 2.43.10 → 2.43.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,8 +24,10 @@ async function syncFile(server, localFile) {
|
|
|
24
24
|
"--prune-empty-dirs",
|
|
25
25
|
"--chmod=Fg+w",
|
|
26
26
|
"--no-perms",
|
|
27
|
+
"--no-t",
|
|
27
28
|
"--filter='merge " + path.resolve(__dirname,"rsyncFilter-pre.txt") + "'",
|
|
28
|
-
"--filter='merge " + path.resolve(__dirname,"rsyncFilter-post.txt") + "'"]
|
|
29
|
+
"--filter='merge " + path.resolve(__dirname,"rsyncFilter-post.txt") + "'"],
|
|
30
|
+
{ shell: true, env: { "RSYNC_RSH": "ssh -o ConnectTimeout=30 -o ServerAliveInterval=30 -o ServerAliveCountMax=30" } })
|
|
29
31
|
.then(count = RSYNC_RETRIES)
|
|
30
32
|
.catch(async (err) => {
|
|
31
33
|
// exitCode 23 indicam que o ficheiro não existe na origem. Temod de apagar no destino.
|
|
@@ -38,8 +40,8 @@ async function syncFile(server, localFile) {
|
|
|
38
40
|
await execa('ssh', [server, "rm -rf " + remoteFileDir]).catch({});
|
|
39
41
|
}
|
|
40
42
|
count = RSYNC_RETRIES;
|
|
41
|
-
} else if (count > RSYNC_RETRIES) {
|
|
42
|
-
if (DEBUG) console.log("rsync '" + productScopeFilePath + "': failed with " + err.exitCode + " -> " + err.message);
|
|
43
|
+
} else if ((count + 1)> RSYNC_RETRIES) {
|
|
44
|
+
if (DEBUG) console.log("rsync '" + productScopeFilePath + "': failed with " + err.exitCode + " -> " + err.message, err);
|
|
43
45
|
throw err;
|
|
44
46
|
} else {
|
|
45
47
|
if (DEBUG) console.log("rsync '" + productScopeFilePath + "': attempt " + (count + 1) + " failed with code " + err.exitCode);
|
|
@@ -48,4 +50,4 @@ async function syncFile(server, localFile) {
|
|
|
48
50
|
count++;
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
|
-
exports.syncFile = syncFile;
|
|
53
|
+
exports.syncFile = syncFile;
|
package/package.json
CHANGED