Skip to content

Commit 9b314f0

Browse files
committed
feat(ci): improve change log reading
1 parent 5789c96 commit 9b314f0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

build/Changelog.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ let getVersionNumber envVarName ctx =
101101

102102
failwith "Invalid version number"
103103

104-
let mutable changelogBackupFilename = ""
105-
106104
let updateChangelog changelogPath (changelog : Fake.Core.Changelog.Changelog) gitHubRepoUrl ctx =
107105

108106
let verStr = ctx |> getVersionNumber "RELEASE_VERSION"
@@ -174,7 +172,7 @@ let updateChangelog changelogPath (changelog : Fake.Core.Changelog.Changelog) gi
174172
Changelog.Changelog.New (changelog.Header, changelog.Description, None, newEntry :: changelog.Entries)
175173

176174
// Save changelog to temporary file before making any edits
177-
changelogBackupFilename <- System.IO.Path.GetTempFileName ()
175+
let changelogBackupFilename = System.IO.Path.GetTempFileName ()
178176

179177
changelogPath |> Shell.copyFile changelogBackupFilename
180178

@@ -231,4 +229,4 @@ let updateChangelog changelogPath (changelog : Fake.Core.Changelog.Changelog) gi
231229
// If build fails after this point but before we commit changes, undo our modifications
232230
Target.activateBuildFailure "RevertChangelog"
233231

234-
newEntry
232+
(newEntry, changelogBackupFilename)

0 commit comments

Comments
 (0)