-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop logging the proc info when a command fails (#2716)
Stop logging the proc info which had no value and because rush decide it is so important to crop the logs and only show the end we never had meaningful info Before ![image](https://github.com/microsoft/typespec/assets/1031227/438962ed-cf83-4517-b8bd-2f1d86180add) Now ![image](https://github.com/microsoft/typespec/assets/1031227/5e738b2b-43e0-4a70-a4b5-c392803e2a94) --------- Co-authored-by: Brian Terlson <[email protected]>
- Loading branch information
1 parent
8d55283
commit 53aa383
Showing
14 changed files
with
129 additions
and
96 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/internal-build-utils/internal-remove-proc-log_2023-12-04-17-14.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/internal-build-utils", | ||
"comment": "Add `runOrExit` helper to have a cleaner script runner without caring about the failure", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/internal-build-utils" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
// @ts-check | ||
import { | ||
CommandFailedError, | ||
ensureDotnetVersion, | ||
runDotnetFormat, | ||
} from "../../packages/internal-build-utils/dist/src/index.js"; | ||
import { CommandFailedError, runPrettier } from "./helpers.js"; | ||
import { runPrettier } from "./helpers.js"; | ||
|
||
try { | ||
runPrettier("--list-different"); | ||
ensureDotnetVersion({ exitWithSuccessInDevBuilds: true }); | ||
runDotnetFormat("--verify-no-changes"); | ||
await runPrettier("--list-different"); | ||
await ensureDotnetVersion({ exitWithSuccessInDevBuilds: true }); | ||
await runDotnetFormat("--verify-no-changes"); | ||
} catch (err) { | ||
if (err instanceof CommandFailedError) { | ||
console.error( | ||
"\nERROR: Files above are not formatted correctly. Run `rush format` and commit the changes." | ||
); | ||
process.exit(err.proc?.status ?? 1); | ||
process.exit(err.proc?.exitCode ?? 1); | ||
} | ||
throw err; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import { npmForEach, run } from "./helpers.js"; | ||
run("rush", ["update"]); | ||
run("rush", ["build"]); | ||
// @ts-check | ||
import { runOrExit } from "../../packages/internal-build-utils/dist/src/common.js"; | ||
import { npmForEach } from "./helpers.js"; | ||
await runOrExit("rush", ["update"]); | ||
await runOrExit("rush", ["build"]); | ||
npmForEach("dogfood"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
// @ts-check | ||
import { | ||
ensureDotnetVersion, | ||
exitOnFailedCommand, | ||
runDotnetFormat, | ||
} from "../../packages/internal-build-utils/dist/src/index.js"; | ||
import { runPrettier } from "./helpers.js"; | ||
runPrettier("--write"); | ||
|
||
await exitOnFailedCommand(() => runPrettier("--write")); | ||
|
||
await ensureDotnetVersion({ exitWithSuccessInDevBuilds: true }); | ||
await runDotnetFormat(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import { repoRoot, run, tsc } from "./helpers.js"; | ||
import { run } from "../../packages/internal-build-utils/dist/src/index.js"; | ||
import { repoRoot, tsc } from "./helpers.js"; | ||
|
||
run(tsc, ["--build", "./tsconfig.ws.json", "--watch"], { cwd: repoRoot, sync: false }); |
Oops, something went wrong.