Skip to content

Commit 49ab9d1

Browse files
author
Nicholas Pape
authored
Rush: Deprecate the "--quiet" flag rather than completely removing it (microsoft#119)
* Make quiet deprecated, rather than removing, so that CI builds are unaffected * PR Feedback * tslint
1 parent bc02ac4 commit 49ab9d1

File tree

4 files changed

+51
-0
lines changed

4 files changed

+51
-0
lines changed

common/changes/common.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush-lib",
5+
"comment": "Rush will automatically create the common folder.",
6+
"type": "patch"
7+
},
8+
{
9+
"packageName": "@microsoft/rush",
10+
"comment": "Rush install checks to ensure that generate has been run.",
11+
"type": "patch"
12+
}
13+
],
14+
"email": "nickpape@users.noreply.github.com"
15+
}

common/changes/pinned.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush-lib",
5+
"comment": "Add a \"pinnedVersions\" option to rush.json, which will add dependencies to the common package.json. Since these dependencies are installed first, this mechanism can be used to control versions of unconstrained second-level dependencies.",
6+
"type": "minor"
7+
},
8+
{
9+
"packageName": "@microsoft/rush",
10+
"comment": "Add a \"pinnedVersions\" option to rush.json, which will add dependencies to the common package.json. Since these dependencies are installed first, this mechanism can be used to control versions of unconstrained second-level dependencies.",
11+
"type": "minor"
12+
}
13+
],
14+
"email": "nickpape@users.noreply.github.com"
15+
}

common/changes/verbose.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush",
5+
"comment": "Make --quiet builds the default. Deprecate the --quiet parameter. Add a --verbose parameter which displays the build logs.",
6+
"type": "minor"
7+
}
8+
],
9+
"email": "nickpape@users.noreply.github.com"
10+
}

rush/rush/src/actions/RebuildAction.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default class RebuildAction extends CommandLineAction {
4545
private _parallelismParameter: CommandLineIntegerParameter;
4646
private _parser: RushCommandLineParser;
4747
private _productionParameter: CommandLineFlagParameter;
48+
private _quietParameter: CommandLineFlagParameter;
4849
private _toFlag: CommandLineStringListParameter;
4950
private _vsoParameter: CommandLineFlagParameter;
5051
private _minimalParameter: CommandLineFlagParameter;
@@ -105,6 +106,11 @@ export default class RebuildAction extends CommandLineAction {
105106
parameterShortName: '-v',
106107
description: 'Display the logs during the build, rather than just displaying the build status summary'
107108
});
109+
this._quietParameter = this.defineFlagParameter({
110+
parameterLongName: '--quiet',
111+
parameterShortName: '-q',
112+
description: 'Only show errors and overall build status'
113+
});
108114
}
109115

110116
protected onExecute(): void {
@@ -116,6 +122,11 @@ export default class RebuildAction extends CommandLineAction {
116122
}
117123
this._rushLinkJson = JsonFile.loadJsonFile(this._rushConfiguration.rushLinkJsonFilename);
118124

125+
if (this._quietParameter.value) {
126+
console.log(colors.yellow(`DEPRECATED: The --quiet parameter will be removed soon, ` +
127+
`because builds are now quiet by default`));
128+
}
129+
119130
console.log(`Starting "rush ${this.options.actionVerb}"` + os.EOL);
120131
const stopwatch: Stopwatch = Stopwatch.start();
121132

0 commit comments

Comments
 (0)