Skip to content

Commit 591e22d

Browse files
authored
Rename release notes for 3.0.0-rc to 3.0.0.rc (#17510)
* Change -rc versions to .rc\d* * Fix the download link * Rename to 3.0.0.rc1
1 parent c11f66d commit 591e22d

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

layouts/release-notes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ <h2 class="border-bottom-0 m-0 p-0">
5050
<span class="IssueLabel bg-orange text-white ml-3" style="white-space: pre">Release Candidate</span>
5151
{% endif %}
5252

53-
<a href="https://enterprise.github.com/releases/{{ patch.version | replace: '-rc', '' }}/download" class="ml-3 text-small text-bold">
53+
<a href="https://enterprise.github.com/releases/{{ patch.downloadVersion }}/download" class="ml-3 text-small text-bold">
5454
Download
5555
</a>
5656

middleware/contextualizers/enterprise-release-notes.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ const enterpriseReleases = require('../../lib/enterprise-server-releases').suppo
99
*/
1010
function sortPatchKeys (release, version) {
1111
const keys = Object.keys(release)
12-
.map(key => ({ version: `${version}.${key}`, patchVersion: key, ...release[key] }))
12+
.map(key => {
13+
const keyWithDots = key.replace(/-/g, '.')
14+
return {
15+
version: `${version}.${keyWithDots}`,
16+
patchVersion: keyWithDots,
17+
downloadVersion: `${version}.${keyWithDots.replace(/\.rc\d*$/, '')}`,
18+
...release[key]
19+
}
20+
})
1321
return keys
1422
.sort((a, b) => {
1523
if (semver.gt(a.version, b.version)) return -1

0 commit comments

Comments
 (0)