!382 optimize cache path.

Merge pull request !382 from lihong/master
This commit is contained in:
openharmony_ci
2022-03-15 15:09:56 +00:00
committed by Gitee
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -60,6 +60,8 @@ function initProjectConfig(projectConfig) {
projectConfig.hashProjectPath = projectConfig.hashProjectPath ||
hashProjectPath(projectConfig.projectPath)
projectConfig.aceBuildJson = projectConfig.aceBuildJson || process.env.aceBuildJson;
projectConfig.cachePath = projectConfig.cachePath || process.env.cachePath ||
path.resolve(__dirname, 'node_modules/.cache');
}
function loadEntryObj(projectConfig) {
+5 -1
View File
@@ -123,7 +123,8 @@ function initConfig(config) {
});
if (!/ets_loader_ark$/.test(__dirname)) {
config.cache = {
type: "filesystem"
type: "filesystem",
cacheDirectory: path.resolve(projectConfig.cachePath, '.ets_cache')
};
}
}
@@ -148,6 +149,9 @@ function setProjectConfig(envArgs) {
if (envArgs.aceModuleJsonPath) {
projectConfig.aceModuleJsonPath = envArgs.aceModuleJsonPath;
}
if (envArgs.cachePath) {
projectConfig.cachePath = envArgs.cachePath;
}
}
function setReleaseConfig(config) {