optimise github actions
This commit is contained in:
@@ -8,9 +8,6 @@ const IS_AZURE_PIPELINES = process.env.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI !== un
|
||||
const IS_GITHUB_ACTIONS = process.env.GITHUB_ACTIONS === 'true';
|
||||
const FILE_PATH_COLOR = '\x1b[36m%s\x1b[0m';
|
||||
|
||||
if (IS_CI) {
|
||||
console.log('::group::Checking path length');
|
||||
}
|
||||
console.log(`Checking path length in ${PROJECT_DIR} for paths exceeding ${MAX_PATH_LENGTH}...`);
|
||||
console.log('CI detected:', IS_CI);
|
||||
|
||||
@@ -32,9 +29,9 @@ function checkPathLength(dir) {
|
||||
if (IS_AZURE_PIPELINES) {
|
||||
console.error(`##vso[task.logissue type=warning;]Path exceeds maximum length of ${MAX_PATH_LENGTH} characters: ${filePath} with ${filePath.length} characters`);
|
||||
} else if (IS_GITHUB_ACTIONS) {
|
||||
console.error(`::warning file=${filePath},title=Path exceeds ${MAX_PATH_LENGTH}::Paths should not be longer than ${MAX_PATH_LENGTH} characters to support WIN32 systems. The file ${filePath} exceeds that with ${filePath.length - MAX_PATH_LENGTH} characters.`);
|
||||
console.error(`::warning file=${filePath},title=Path exceeds ${MAX_PATH_LENGTH} characters::Paths should not be longer than ${MAX_PATH_LENGTH} characters to support WIN32 systems.\nThe file ${filePath} exceeds that with ${filePath.length - MAX_PATH_LENGTH} characters.`);
|
||||
} else {
|
||||
console.error(`Path exceeds maximum length of ${MAX_PATH_LENGTH} characters: ${FILE_PATH_COLOR}`, filePath, filePath.length);
|
||||
console.error(`Path exceeds maximum length of ${MAX_PATH_LENGTH} characters: ${FILE_PATH_COLOR}`, filePath, filePath.length - MAX_PATH_LENGTH);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +42,3 @@ function checkPathLength(dir) {
|
||||
}
|
||||
|
||||
checkPathLength(PROJECT_DIR, MAX_PATH_LENGTH);
|
||||
|
||||
if (IS_CI) {
|
||||
console.log('::endgroup::');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user