Skip to content

Commit

Permalink
Fix theme count in release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalcraftsman authored and bep committed Jul 21, 2021
1 parent 11bb67d commit a352d19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions releaser/releasenotes_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ func writeReleaseNotes(version string, infosMain, infosDocs gitInfos, to io.Writ
}

func fetchThemeCount() (int, error) {
resp, err := http.Get("https://github.com/raw/gohugoio/hugoThemes/master/.gitmodules")
resp, err := http.Get("https://github.com/raw/gohugoio/hugoThemesSiteBuilder/main/themes.txt")
if err != nil {
return 0, err
}
defer resp.Body.Close()

b, _ := ioutil.ReadAll(resp.Body)
return bytes.Count(b, []byte("submodule")), nil
return bytes.Count(b, []byte("\n")) - bytes.Count(b, []byte("#")), nil
}

func writeReleaseNotesToTmpFile(version string, infosMain, infosDocs gitInfos) (string, error) {
Expand Down

0 comments on commit a352d19

Please sign in to comment.