feat(bin): 优化上传命令
This commit is contained in:
@@ -71,6 +71,7 @@ export const run_package_batch = async (projects) => {
|
||||
}
|
||||
|
||||
const upload = async (file_path) => {
|
||||
let start = new Date().getTime()
|
||||
let response = await spinner(
|
||||
`Uploading project ${file_path}`,
|
||||
() => fetch(`${upload_url}/file/upload/${path.basename(file_path)}`, {
|
||||
@@ -87,7 +88,7 @@ const upload = async (file_path) => {
|
||||
if (!isEqual(response.status, 200)) {
|
||||
throw response
|
||||
}
|
||||
console.log(`✅ Finish upload ${file_path}`)
|
||||
console.log(`✅ Finish upload ${file_path} (${millisecondToString((new Date().getTime()) - start)})`)
|
||||
fs.rmSync(file_path)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user