@@ -86,6 +86,35 @@ const _PAGES = [
86
86
" Release notes" => " release_notes.md" ,
87
87
]
88
88
89
+ # ==============================================================================
90
+ # Modify the release notes
91
+ # ==============================================================================
92
+
93
+ function fix_release_line (
94
+ line:: String ,
95
+ url:: String = " https://github.com/jump-dev/MathOptInterface.jl"
96
+ )
97
+ # (#XXXX) -> ([#XXXX](url/issue/XXXX))
98
+ while (m = match (r" \(\# ([0-9]+)\) " , line)) != = nothing
99
+ id = m. captures[1 ]
100
+ line = replace (line, m. match => " ([#$id ]($url /issues/$id ))" )
101
+ end
102
+ # ## vX.Y.Z -> [vX.Y.Z](url/releases/tag/vX.Y.Z)
103
+ while (m = match (r" \#\# (v[0-9]+.[0-9]+.[0-9]+)" , line)) != = nothing
104
+ tag = m. captures[1 ]
105
+ line = replace (line, m. match => " ## [$tag ]($url /releases/tag/$tag )" )
106
+ end
107
+ return line
108
+ end
109
+
110
+ open (joinpath (@__DIR__ , " src" , " changelog.md" ), " r" ) do in_io
111
+ open (joinpath (@__DIR__ , " src" , " release_notes.md" ), " w" ) do out_io
112
+ for line in readlines (in_io; keep = true )
113
+ write (out_io, fix_release_line (line))
114
+ end
115
+ end
116
+ end
117
+
89
118
# ==============================================================================
90
119
# Build the HTML docs
91
120
# ==============================================================================
0 commit comments