chore(repo): hide publishing logs unless verbose is set (#13046)
This commit is contained in:
parent
2818f2e3a6
commit
269038f8e4
@ -1,7 +1,7 @@
|
|||||||
import { execSync } from 'child_process';
|
import { execSync } from 'child_process';
|
||||||
import { remove } from 'fs-extra';
|
import { remove } from 'fs-extra';
|
||||||
import { existsSync } from 'fs';
|
import { existsSync } from 'fs';
|
||||||
import { stripIndent } from 'nx/src/utils/logger';
|
import { stripIndent, NX_PREFIX } from 'nx/src/utils/logger';
|
||||||
|
|
||||||
process.env.npm_config_registry = `http://localhost:4872`;
|
process.env.npm_config_registry = `http://localhost:4872`;
|
||||||
process.env.YARN_REGISTRY = process.env.npm_config_registry;
|
process.env.YARN_REGISTRY = process.env.npm_config_registry;
|
||||||
@ -42,9 +42,19 @@ async function buildPackagePublishAndCleanPorts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function updateVersionsAndPublishPackages() {
|
async function updateVersionsAndPublishPackages() {
|
||||||
execSync(`yarn nx-release major --local`, {
|
console.log(`\n${NX_PREFIX} 📦 Publishing packages\n`);
|
||||||
stdio: 'inherit',
|
const isVerbose =
|
||||||
|
process.env.NX_VERBOSE_LOGGING === 'true' ||
|
||||||
|
process.argv.includes('--verbose');
|
||||||
|
const response = execSync(`yarn nx-release major --local`, {
|
||||||
|
stdio: isVerbose ? 'inherit' : 'pipe',
|
||||||
|
encoding: 'utf8',
|
||||||
});
|
});
|
||||||
|
// extract published version
|
||||||
|
if (!isVerbose) {
|
||||||
|
const value = response.match(/Successfully published:\s+ - .+@(.*)/);
|
||||||
|
console.log(`${NX_PREFIX} ✅ Published local version: ${value?.[1]}\n`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user