mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Chore: minor changes
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import process from 'node:process';
|
||||
import os from 'node:os';
|
||||
import fs from 'node:fs';
|
||||
import fsp from 'node:fs/promises';
|
||||
|
||||
import { downloadPreviousBuild } from './download-previous-build';
|
||||
import { buildCommon } from './build-common';
|
||||
@@ -30,7 +29,7 @@ import { buildCloudMounterRules } from './build-cloudmounter-rules';
|
||||
import { createSpan, printTraceResult, whyIsNodeRunning } from './trace';
|
||||
import { buildDeprecateFiles } from './build-deprecate-files';
|
||||
import path from 'node:path';
|
||||
import { CACHE_DIR, ROOT_DIR } from './constants/dir';
|
||||
import { ROOT_DIR } from './constants/dir';
|
||||
import { isCI } from 'ci-info';
|
||||
|
||||
process.on('uncaughtException', (error) => {
|
||||
@@ -42,12 +41,6 @@ process.on('unhandledRejection', (reason) => {
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
const removesFiles = [
|
||||
path.join(CACHE_DIR, '.cache.db'),
|
||||
path.join(CACHE_DIR, '.cache.db-shm'),
|
||||
path.join(CACHE_DIR, '.cache.db-wal')
|
||||
];
|
||||
|
||||
const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
|
||||
|
||||
(async () => {
|
||||
@@ -90,7 +83,6 @@ const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
|
||||
const buildCommonPromise = downloadPreviousBuildPromise.then(() => buildCommon(rootSpan));
|
||||
|
||||
await Promise.all([
|
||||
...removesFiles.map(file => fsp.rm(file, { force: true })),
|
||||
downloadPreviousBuildPromise,
|
||||
buildCommonPromise,
|
||||
downloadPreviousBuildPromise.then(() => buildRejectIPList(rootSpan)),
|
||||
|
||||
Reference in New Issue
Block a user