Skip to content

Commit 0d96651

Browse files
committed
ci(release): Attempt to fix chalk bg colors on GH CI
1 parent 0a98f7f commit 0d96651

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tools/scripts/release/release.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { handleChangelog } from './changelog';
4040

4141
if (publishOnly) {
4242
// Create new version and update changelog if not only publishing
43-
console.log(printHeader('mode', 'cyanBright'), `Publish only, skipping version and changelog\n`);
43+
console.log(printHeader('mode', 'cyan'), `Publish only, skipping version and changelog\n`);
4444
} else {
4545
console.log('Calculating changed projects...\n');
4646
// Start by obtaining all projects and their suggested release version
@@ -109,12 +109,12 @@ import { handleChangelog } from './changelog';
109109
console.log('\n');
110110

111111
if (skipPublish) {
112-
console.log(printHeader('mode', 'cyanBright'), `Skip publish, version and changelog only\n`);
112+
console.log(printHeader('mode', 'cyan'), `Skip publish, version and changelog only\n`);
113113
return process.exit(0);
114114
} else {
115115
if (projectsList.size === 0) {
116116
console.log(
117-
printHeader('Projects', 'yellow'),
117+
printHeader('Publish', 'cyan'),
118118
`⏭️ Trying to publish but no projects were specified, skipping publish step altogether`
119119
);
120120
return process.exit(0);

tools/scripts/utils/output.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import chalk, { ColorName, ForegroundColorName } from 'chalk';
1+
import chalk, { BackgroundColorName, ColorName, ForegroundColorName } from 'chalk';
22

33
const colors = [
44
{ instance: chalk.green, spinnerColor: 'green' },
@@ -47,5 +47,6 @@ export async function suppressOutput<T>(fn: () => T): Promise<T> {
4747
}
4848

4949
export function printHeader(title: string, color: ForegroundColorName): string {
50-
return chalk.reset[color].inverse.bold(` ${title.toUpperCase()} `);
50+
const bgColor = `bg${color.slice(0, 1).toUpperCase() + color.slice(1)}` as BackgroundColorName;
51+
return chalk.reset[bgColor].black.bold(` ${title.toUpperCase()} `);
5152
}

0 commit comments

Comments
 (0)