build-plugin-teamix
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -30,5 +30,13 @@ const fs = require('fs'); | ||
if (url) { | ||
const repoInfo = url.split(':'); | ||
if (repoInfo && repoInfo[1]) { | ||
repo = repoInfo[1].replace('.git', ''); | ||
if (url.startsWith('git@')) { | ||
const repoArray = url.split(':'); | ||
if (repoArray && repoArray[1]) { | ||
repo = repoArray[1].replace('.git', ''); | ||
} | ||
} else if (url.startsWith('http') || url.startsWith('https')) { | ||
const repoArray = url.split('/'); | ||
const len = repoArray.length; | ||
if (repoArray && len > 1) { | ||
repo = repoArray.slice(len - 2, len).replace('.git', ''); | ||
} | ||
} | ||
@@ -35,0 +43,0 @@ } |
{ | ||
"name": "build-plugin-teamix", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "build-scripts 插件, 适配teamix基础工程", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
6999
178