jenkins测试

This commit is contained in:
aixianling
2023-03-16 10:10:59 +08:00
parent 469737fdd7
commit 8c235bb752

View File

@@ -29,7 +29,7 @@ const getFileInfo = (app, file) => {
name, name,
label, label,
path, path,
libPath: file.replace(/\\/g, '/').replace(/^src(\/.+)\.vue/, '$1'), libPath: file.replace(/\\\//g, '/').replace(/^src(\/.+)\.vue/, '$1'),
type: 'wxwork' type: 'wxwork'
}) })
} }
@@ -37,28 +37,28 @@ const getFileInfo = (app, file) => {
const start = () => { const start = () => {
chalkTag.info('开始同步数据到数据库') chalkTag.info('开始同步数据到数据库')
Promise.all([ Promise.all([
findPages('../src/components/pages', file => { findPages('src/components/pages', file => {
if (/.+\\[^\\]+\\[^\\]+\.vue/g.test(file)) { if (/.+\\\/[^\\\/]+\\\/[^\\\/]+\.vue/g.test(file)) {
let app = { let app = {
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/') path: file.replace(/^src\\\/(.*).vue/g, '$1').replace(/\\\//g, '/')
} }
return getFileInfo(app, file) return getFileInfo(app, file)
} }
}), }),
findPages('../src/apps', file => { findPages('src/apps', file => {
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) { if (/.+\\\/App[^\\\/]+\\\/[^\\\/]+\.vue/g.test(file)) {
let app = { let app = {
name: file.replace(/.*\\([^\\]+).vue/g, '$1'), name: file.replace(/.*\\\/([^\\\/]+).vue/g, '$1'),
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/') path: file.replace(/^src\\\/(.*).vue/g, '$1').replace(/\\\//g, '/')
} }
return getFileInfo(app, file) return getFileInfo(app, file)
} }
}), }),
findPages('../src/project', file => { findPages('src/project', file => {
if (/.+\\App[^\\]+\\[^\\]+\.vue/g.test(file)) { if (/.+\\\/App[^\\\/]+\\\/[^\\\/]+\.vue/g.test(file)) {
let app = { let app = {
name: file.replace(/.*\\([^\\]+).vue/g, '$1'), name: file.replace(/.*\\\/([^\\\/]+).vue/g, '$1'),
path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/') path: file.replace(/^src\\\/(.*).vue/g, '$1').replace(/\\\//g, '/')
} }
return getFileInfo(app, file) return getFileInfo(app, file)
} }