Skip to content

Commit a748990

Browse files
authored
scripts: Add new version to BUG_REPORT.yml (#2461)
1 parent f2882da commit a748990

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

scripts/bump-version/main.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,22 @@ func run(current, next string, realmode bool) error {
3636
return nil
3737
}
3838

39+
{
40+
path := filepath.Join(".github", "ISSUE_TEMPLATE", "BUG_REPORT.yml")
41+
c, err := os.ReadFile(path)
42+
if err != nil {
43+
return err
44+
}
45+
old := string(c)
46+
if !strings.Contains(old, "- "+next) {
47+
item := "- " + current
48+
new := strings.ReplaceAll(old, item, "- "+next+"\n "+item)
49+
if err := write(path, old, new); err != nil {
50+
return err
51+
}
52+
}
53+
}
54+
3955
{
4056
path := filepath.Join("docs", "overview", "install.md")
4157
c, err := os.ReadFile(path)

0 commit comments

Comments
 (0)