Skip to content

Commit

Permalink
fix release notes always flagged as latest (#4910)
Browse files Browse the repository at this point in the history
  • Loading branch information
rochdev authored Nov 19, 2024
1 parent 04ad392 commit 204eb35
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/release/notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
Expand All @@ -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}.`)

0 comments on commit 204eb35

Please sign in to comment.