mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 15:02:11 +08:00
fix(@angular/cli): disable update commit creation by default
Closes #16013
This commit is contained in:
parent
449c51f87e
commit
7735516949
@ -425,7 +425,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
|
|||||||
packageName,
|
packageName,
|
||||||
migrations,
|
migrations,
|
||||||
migrationRange,
|
migrationRange,
|
||||||
!options.skipCommits,
|
options.createCommits,
|
||||||
);
|
);
|
||||||
|
|
||||||
return success ? 0 : 1;
|
return success ? 0 : 1;
|
||||||
@ -539,7 +539,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
|
|||||||
migrateExternal: true,
|
migrateExternal: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (success && !options.skipCommits) {
|
if (success && options.createCommits) {
|
||||||
this.createCommit('Angular CLI update\n' + packagesToUpdate.join('\n'), []);
|
this.createCommit('Angular CLI update\n' + packagesToUpdate.join('\n'), []);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
|
|||||||
migration.package,
|
migration.package,
|
||||||
migration.collection,
|
migration.collection,
|
||||||
new semver.Range('>' + migration.from + ' <=' + migration.to),
|
new semver.Range('>' + migration.from + ' <=' + migration.to),
|
||||||
!options.skipCommits,
|
options.createCommits,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
@ -63,8 +63,8 @@
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
"skipCommits": {
|
"createCommits": {
|
||||||
"description": "Do not create source control commits for updates and migrations.",
|
"description": "Create source control commits for updates and migrations.",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
"aliases": ["C"]
|
"aliases": ["C"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user