MCPcopy
hub / github.com/syncthing/syncthing / main

Function main

script/relnotes.go:33–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31)
32
33func main() {
34 ver := flag.String("new-ver", "", "New version tag")
35 prevVer := flag.String("prev-ver", "", "Previous version tag")
36 branch := flag.String("branch", "HEAD", "Branch to release from")
37 flag.Parse()
38
39 log.SetOutput(os.Stderr)
40
41 if *ver == "" {
42 log.Fatalln("Must set --new-ver")
43 }
44 if githubToken == "" {
45 log.Fatalln("Must set $GITHUB_TOKEN")
46 }
47
48 notes, err := additionalNotes(*ver)
49 if err != nil {
50 log.Fatalln("Gathering additional notes:", err)
51 }
52 gh, err := generatedNotes(*ver, *branch, *prevVer)
53 if err != nil {
54 log.Fatalln("Gathering github notes:", err)
55 }
56 notes = append(notes, gh)
57
58 fmt.Println(strings.Join(notes, "\n\n"))
59}
60
61// Load potential additional release notes from within the repo
62func additionalNotes(newVer string) ([]string, error) {

Callers

nothing calls this directly

Calls 4

additionalNotesFunction · 0.85
generatedNotesFunction · 0.85
ParseMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected