Commit 905c3677 authored by nano's avatar nano

debug

parent d8b7b157
This diff is collapsed.
......@@ -7,7 +7,7 @@ export default {
upload_path: path.join(__dirname, './test/upload'),
download_path: path.join(__dirname, './test/release/downloads'),
new_apps_json: `${baseUrl}/v2/apps`,
upload_url: `${baseUrl}/v1/upload/packageUrl`,
upload_url: `${testUrl}/v1/upload/packageUrl`,
old_apps_json: 'https://api.moecube.com/apps.json',
new_package: `${baseUrl}/v1/package/`,
new_app: (appId) => `${baseUrl}/v1/app/${appId}`,
......
import axios from 'axios';
import config from './config';
import * as uuid from 'uuid';
import * as _ from 'lodash';
import {XmlDocument} from 'xmldoc';
......@@ -107,20 +106,26 @@ async function main() {
newApps.data.map(app => {
apps[app['id']] = app;
})
});
try {
for (let app of data) {
if (!['ygopro', 'desmume', 'test'].includes(app['id']) && !apps[app['id']]) {
await createApp(app)
await createApp(app);
}
}
for (let app of _.sampleSize(data, 1)) {
if (['ygopro', 'desmume', 'test'].includes(app['id'])) {
for (let app of data) {
if (['th10'].includes(app['id'])) {
await updateApp(app);
}
}
// for (let app of _.sampleSize(data, 1)) {
// if (!['ygopro', 'desmume', 'test'].includes(app['id'])) {
// await updateApp(app);
// }
// }
} catch (e) {
console.trace(e);
}
......
......@@ -184,7 +184,7 @@ const uploadPackageUrl = async (ctx: Context) => {
// 上传完,干掉本地目录
await fs.removeAsync(bundled.distPath);
} catch (e) {
console.log(e);
console.trace(e);
pack!.status = 'failed';
await pack!.save();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment