diff --git a/projects/cdk/schematics/utils/is-ci.ts b/projects/cdk/schematics/utils/is-ci.ts new file mode 100644 index 000000000000..d8dcc1a1fc54 --- /dev/null +++ b/projects/cdk/schematics/utils/is-ci.ts @@ -0,0 +1,18 @@ +/// + +export function tuiIsCI(): boolean { + return ( + process.env.TUI_CI === `true` || + !!process.env.CI || // Another CI + !!process.env.GITHUB_ACTION || // Github CI + !!process.env.GITLAB_CI || // Gitlab CI + !!process.env.CIRCLECI || // Circle CI + !!process.env.TF_BUILD || // Azure CI + !!process.env.CIRRUS_CI || // Cirrus CI + !!process.env.BUILDKITE || // Build Kite CI + !!process.env.HEROKU_TEST_RUN_ID || // Heroku CI + !!process.env.CODEBUILD_BUILD_ID || // CodeBuild CI + !!process.env.TEAMCITY_VERSION || // TeamCity CI + !!process.env.BUILD_ID // Jenkins/Hudson + ); +} diff --git a/projects/cdk/schematics/utils/progress.ts b/projects/cdk/schematics/utils/progress.ts index 219380009d8a..07aeb05f9666 100644 --- a/projects/cdk/schematics/utils/progress.ts +++ b/projects/cdk/schematics/utils/progress.ts @@ -1,6 +1,8 @@ +/// import {clearLine, cursorTo} from 'readline'; import {SMALL_TAB_SYMBOL, SUCCESS_SYMBOL} from './colored-log'; +import {tuiIsCI} from './is-ci'; export function setupProgressLogger({ total, @@ -14,6 +16,10 @@ export function setupProgressLogger({ let i = 1; return (message: string, incrementIndex = true): void => { + if (tuiIsCI()) { + return; + } + const isLast = i === total; const progressLog = `(${i} / ${total}) ${prefix} ${ isLast ? SUCCESS_SYMBOL : message