Skip to content

Commit 09f1810

Browse files
committed
Fixes
1 parent e6755ab commit 09f1810

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ static Stream<QualifiedVersion> findPreviousVersion(GitWrapper gitWrapper, Quali
149149
final String currentMajorPattern = "v" + version.major() + ".*";
150150
final String previousMajorPattern = "v" + (version.major() - 1) + ".*";
151151

152-
return gitWrapper.listVersions(previousMajorPattern).filter(v -> v.isBefore(version));
152+
return Stream.concat(gitWrapper.listVersions(currentMajorPattern), gitWrapper.listVersions(previousMajorPattern))
153+
.filter(v -> v.isBefore(version));
153154
}
154155

155156
/**

build-tools-internal/src/test/java/org/elasticsearch/gradle/internal/release/ReleaseNotesGeneratorTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import java.nio.charset.StandardCharsets;
1515
import java.nio.file.Files;
16-
import java.nio.file.Path;
1716
import java.nio.file.Paths;
1817
import java.util.ArrayList;
1918
import java.util.List;
@@ -91,8 +90,6 @@ public void testTemplate(String templateFilename, String outputFilename, List<Ch
9190
// when:
9291
final String actualOutput = ReleaseNotesGenerator.generateFile(template, bundles);
9392

94-
Files.write(Path.of("/Users/bseeders/output.txt"), actualOutput.getBytes());
95-
9693
// then:
9794
assertThat(actualOutput, equalTo(expectedOutput));
9895
}

0 commit comments

Comments
 (0)