...
|
...
|
@@ -11,7 +11,9 @@ import md5 from 'md5'; |
|
|
import {Hotfix} from '../../models';
|
|
|
import qn from '../../../lib/qiniu'
|
|
|
import path from 'path';
|
|
|
import Operation from '../../logger/operation';
|
|
|
import Operation from '../../logger/operation'
|
|
|
|
|
|
const env = process.env.NODE_ENV || 'development';
|
|
|
|
|
|
let r = new Router();
|
|
|
|
...
|
...
|
@@ -60,14 +62,14 @@ const hf = { |
|
|
time: new Date()
|
|
|
};
|
|
|
|
|
|
let batchKey = `app-hotfix2/${appName}/${type.toLowerCase()}/${appVersion}`;
|
|
|
let batchKey = `app-hotfix2/${env}/${appName}/${type.toLowerCase()}/${appVersion}`;
|
|
|
|
|
|
if (patchVersion) {
|
|
|
batchKey = path.join(batchKey, patchVersion);
|
|
|
}
|
|
|
batchKey = path.join(batchKey, batchFile.name);
|
|
|
|
|
|
let apiFileKey = `app-hotfix2/${appName}/${type.toLowerCase()}/${appVersion}/api.json`;
|
|
|
let apiFileKey = `app-hotfix2/${env}/${appName}/${type.toLowerCase()}/${appVersion}/api.json`;
|
|
|
let batchUpload = await qn.uploadFileAsync(batchFile.path, {key: batchKey});
|
|
|
|
|
|
if (batchUpload && batchUpload.url) {
|
...
|
...
|
|