@seniorsistemas/semantic-release-maven-config 3.0.3 → 3.0.4
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.
- package/index.js +15 -16
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ const commonConfig = require("@seniorsistemas/semantic-release-common-config");
|
|
|
2
2
|
const https = require("https");
|
|
3
3
|
const fs = require("fs");
|
|
4
4
|
const path = require("path");
|
|
5
|
-
const { execSync,
|
|
5
|
+
const { execSync, spawn } = require("child_process");
|
|
6
6
|
|
|
7
7
|
const NEXUS_BASE = "https://nexus.senior.com.br";
|
|
8
8
|
const SEARCH_PATH =
|
|
@@ -85,26 +85,25 @@ module.exports = {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
logger.log("Running: seniorops generate --ecosystem %s --type %s", ECOSYSTEM, TYPE);
|
|
88
|
-
|
|
89
|
-
const
|
|
88
|
+
await new Promise((resolve, reject) => {
|
|
89
|
+
const child = spawn(
|
|
90
90
|
BINARY_PATH,
|
|
91
91
|
["generate", "--ecosystem", ECOSYSTEM, "--type", TYPE],
|
|
92
92
|
{
|
|
93
|
-
env: { ...process.env, GITHUB_REF_NAME: nextRelease.version, GITHUB_REF: `refs/tags/${nextRelease.version}`, GITHUB_REF_TYPE: "tag" },
|
|
94
|
-
stdio: "pipe",
|
|
93
|
+
env: { ...process.env, ECOSYSTEM, TYPE, GITHUB_REF_NAME: nextRelease.version, GITHUB_REF: `refs/tags/${nextRelease.version}`, GITHUB_REF_TYPE: "tag" },
|
|
95
94
|
}
|
|
96
95
|
);
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
96
|
+
child.stdout.on("data", (data) => logger.log(data.toString()));
|
|
97
|
+
child.stderr.on("data", (data) => logger.error(data.toString()));
|
|
98
|
+
child.on("error", reject);
|
|
99
|
+
child.on("close", (code) => {
|
|
100
|
+
if (code !== 0) {
|
|
101
|
+
reject(new Error(`seniorops generate exited with code ${code}`));
|
|
102
|
+
} else {
|
|
103
|
+
resolve();
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
});
|
|
108
107
|
|
|
109
108
|
logger.log("Replacing Nexus URLs in pom.xml files");
|
|
110
109
|
try {
|
package/package.json
CHANGED