From 204eb3514ba376a95c781fce90c41dcd0117e7d3 Mon Sep 17 00:00:00 2001 From: Roch Devost Date: Tue, 19 Nov 2024 15:01:37 -0500 Subject: [PATCH] fix release notes always flagged as latest (#4910) --- scripts/release/notes.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/release/notes.js b/scripts/release/notes.js index d8538643c70..b083839dd24 100644 --- a/scripts/release/notes.js +++ b/scripts/release/notes.js @@ -3,7 +3,7 @@ const fs = require('fs') const os = require('os') const path = require('path') -const { capture, success, run } = require('./helpers/terminal') +const { capture, run } = require('./helpers/terminal') const pkg = require('../../package.json') const version = pkg.version @@ -15,9 +15,8 @@ const flags = [] const folder = path.join(os.tmpdir(), 'release_notes') const file = path.join(folder, `${tag}.md`) -if (args.includes('--latest')) { - flags.push('--latest') -} +// Default is to determine this automatically, so set it explicitly instead. +flags.push(args.includes('--latest') ? '--latest' : '--latest=false') if (version.includes('-')) { flags.push('--prerelease') @@ -27,5 +26,3 @@ fs.mkdirSync(folder, { recursive: true }) fs.writeFileSync(file, body) run(`gh release create ${tag} --target v${major}.x --title ${version} -F ${file} ${flags.join(' ')}`) - -success(`Release notes published for ${version}.`)