Fix --dry-run issue when descriptions aren't sync'd

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2023-08-17 16:05:46 +02:00
parent 34f6a8cc28
commit ec13d3e860
2 changed files with 6 additions and 2 deletions
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Fixed a bug with the `generate-catalog-info` command that could cause the `--dry-run` flag to indicate changes to files when no changes would actually be made if the command were run without the flag.
@@ -149,9 +149,8 @@ function fixCatalogInfoYaml(options: FixOptions) {
const badName = yamlJson.metadata.name !== safeName;
const badType =
yamlJson.spec?.type !== `backstage-${packageJson.backstage.role}`;
const badDesc = yamlJson.metadata.description !== packageJson.description;
if (badOwner || badTitle || badName || badType || badDesc) {
if (badOwner || badTitle || badName || badType) {
const owner = badOwner
? getOwnerFromCodeowners(codeowners, yamlPath)
: yamlJson.spec?.owner;