Skip to content

Commit 70585a8

Browse files
authored
Skip update of breaking changes and migration guide for patch releases (#89737) (#89761)
1 parent 9fce22d commit 70585a8

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release/GenerateReleaseNotesTask.java

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -128,26 +128,29 @@ public void executeTask() throws IOException {
128128
changelogsByVersion.getOrDefault(qualifiedVersion, Set.of())
129129
);
130130

131-
LOGGER.info("Generating release highlights...");
132-
ReleaseHighlightsGenerator.update(
133-
this.releaseHighlightsTemplate.get().getAsFile(),
134-
this.releaseHighlightsFile.get().getAsFile(),
135-
entries
136-
);
131+
// Only update breaking changes and migration guide for new minors
132+
if (qualifiedVersion.revision() == 0) {
133+
LOGGER.info("Generating release highlights...");
134+
ReleaseHighlightsGenerator.update(
135+
this.releaseHighlightsTemplate.get().getAsFile(),
136+
this.releaseHighlightsFile.get().getAsFile(),
137+
entries
138+
);
137139

138-
LOGGER.info("Generating breaking changes / deprecations notes...");
139-
BreakingChangesGenerator.update(
140-
this.breakingChangesTemplate.get().getAsFile(),
141-
this.breakingChangesMigrationFile.get().getAsFile(),
142-
entries
143-
);
140+
LOGGER.info("Generating breaking changes / deprecations notes...");
141+
BreakingChangesGenerator.update(
142+
this.breakingChangesTemplate.get().getAsFile(),
143+
this.breakingChangesMigrationFile.get().getAsFile(),
144+
entries
145+
);
144146

145-
LOGGER.info("Updating migration/index...");
146-
MigrationIndexGenerator.update(
147-
getMinorVersions(versions),
148-
this.migrationIndexTemplate.get().getAsFile(),
149-
this.migrationIndexFile.get().getAsFile()
150-
);
147+
LOGGER.info("Updating migration/index...");
148+
MigrationIndexGenerator.update(
149+
getMinorVersions(versions),
150+
this.migrationIndexTemplate.get().getAsFile(),
151+
this.migrationIndexFile.get().getAsFile()
152+
);
153+
}
151154
}
152155

153156
/**

0 commit comments

Comments
 (0)