Skip to content
Permalink
Browse files
Fix theme count in release notes
  • Loading branch information
digitalcraftsman authored and bep committed Jul 21, 2021
1 parent 11bb67d commit a352d19d881474f53d01791be4febd305453a9d6
Showing with 2 additions and 2 deletions.
  1. +2 −2 releaser/releasenotes_writer.go
@@ -177,14 +177,14 @@ func writeReleaseNotes(version string, infosMain, infosDocs gitInfos, to io.Writ
}

func fetchThemeCount() (int, error) {
resp, err := http.Get("https://raw.githubusercontent.com/gohugoio/hugoThemes/master/.gitmodules")
resp, err := http.Get("https://raw.githubusercontent.com/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) {

0 comments on commit a352d19

Please sign in to comment.