File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments