@wjwjq/release-helper 0.2.3 → 0.2.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/dist/publish.js +8 -2
- package/package.json +1 -1
package/dist/publish.js
CHANGED
|
@@ -22,8 +22,14 @@ async function isGitFlowRepo() {
|
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
24
|
async function getRepo() {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
let repo;
|
|
26
|
+
try {
|
|
27
|
+
const res = await execa(`git remote -v `).pipe(` sed -n '1p'`).pipe(`awk -F ' ' '{print $2}'`).pipe(`sed -e 's/.git//'`);
|
|
28
|
+
repo = res.stdout.replace("\n", "");
|
|
29
|
+
} catch (error) {
|
|
30
|
+
const res = await $`git remote -v`;
|
|
31
|
+
repo = res.stdout.split("\n")[1].split(" ")[0].split(" ")[1].replace(".git", "").replace("\n", "");
|
|
32
|
+
}
|
|
27
33
|
if (repo.startsWith("git@")) {
|
|
28
34
|
const ps2 = repo.split("/");
|
|
29
35
|
return {
|