Skip to content

Commit caf7f85

Browse files
committed
HHH-18861 - Improve GitHub release announcement body for automated releases
1 parent 2a70f06 commit caf7f85

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

ci/release/Jenkinsfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,19 @@ pipeline {
148148
env.RELEASE_VERSION = releaseVersion.toString()
149149
env.DEVELOPMENT_VERSION = developmentVersion.toString()
150150

151-
def notesFile = new File( "release_notes.md" )
152-
assert notesFile.exists
151+
def notesFiles = findFiles(glob: 'release_notes.md')
152+
if ( notesFiles.length < 1 ) {
153+
throw new IllegalStateException( "Could not locate `release_notes.md`" )
154+
}
155+
if ( notesFiles.length > 1 ) {
156+
throw new IllegalStateException( "Located more than 1 `release_notes.md`" )
157+
}
158+
159+
def notesFile = notesFile[0]
160+
if ( !notesFile.exists ) {
161+
throw new IllegalStateException( "File `release_notes.md` does not exist" )
162+
}
163+
153164
env.SCRIPT_OPTIONS = " --notes=${notesFile.absolutePath}"
154165

155166
if ( params.RELEASE_DRY_RUN ) {

0 commit comments

Comments
 (0)