mirror of
https://github.com/Luzifer/git-changerelease.git
synced 2024-12-20 19:11:17 +00:00
Fix: Need to read the changelog after editing to get new version
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
6b67d5129f
commit
178ef361f5
1 changed files with 6 additions and 1 deletions
7
main.go
7
main.go
|
@ -241,7 +241,12 @@ func renderLogAndGetVersion(newVersion *semVer, logs []commit) (*semVer, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read back version from changelog file
|
// Read back version from changelog file
|
||||||
changelog := strings.Split(string(c), "\n")
|
newLog, err := readChangelog()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("reading back changelog after edit: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
changelog := strings.Split(newLog, "\n")
|
||||||
if len(changelog) < 1 {
|
if len(changelog) < 1 {
|
||||||
return nil, errors.New("changelog is empty, no way to read back the version")
|
return nil, errors.New("changelog is empty, no way to read back the version")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue