-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Rancher UI dashboard commands #474
Conversation
cd5900c
to
453d7b5
Compare
578e465
to
2e8c050
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to add the ui config example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using latestPreRelease and the release type also includes alphas and other future pre-release types, not just rcs
9cf135a
to
ac7637e
Compare
func genUIReleaseNotes(tmpl *template.Template, _ string, rd uiReleaseNoteData) (*bytes.Buffer, error) { | ||
uiTemplate := fmt.Sprintf(dashboardReleaseNoteTemplate, "ui") | ||
tmpl = template.Must(tmpl.Parse(uiTemplate)) | ||
b := bytes.NewBuffer(nil) | ||
if err := tmpl.ExecuteTemplate(b, uiRepo, rd); err != nil { | ||
return nil, err | ||
} | ||
return b, nil | ||
} | ||
|
||
func genDashboardReleaseNotes(tmpl *template.Template, _ string, rd dashboardReleaseNoteData) (*bytes.Buffer, error) { | ||
dashboardTemplate := fmt.Sprintf(dashboardReleaseNoteTemplate, "dashboard") | ||
tmpl = template.Must(tmpl.Parse(dashboardTemplate)) | ||
b := bytes.NewBuffer(nil) | ||
if err := tmpl.ExecuteTemplate(b, dashboardRepo, rd); err != nil { | ||
return nil, err | ||
} | ||
return b, nil | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not saying that we should do it, but I think this is a case where we could use the new go generics
Commands added
$ release [repo] release-notes
Added support for
repo
:ui
dashboard
Command examples:
$ release generate ui release-notes --milestone v2.9.1 --prev-milestone v2.9.0
$ release generate dashboard release-notes --milestone v2.9.1 --prev-milestone v2.9.0
This command will generate and output the release notes, based on two milestones.
$ release [repo] [ga,ra] [version]
Added support for
repo
:ui
dashboard
$ release tag dashboard rc v2.9.1
tags https://github.com/rafaelbreno/rancher-dashboard/releases/tag/v2.9.1-rc1$ release tag dashboard ga v2.9.1
tags https://github.com/rafaelbreno/rancher-dashboard/releases/tag/v2.9.0$ release update rancher dashboard [version]
This command is ran in the
rancher/rancher
fork clone, where it will run a script that updates the two necessary fields, and opens a PR againstrancher/rancher
.Command examples:
$ release update rancher dashboard v2.9.1-rc8
opens Bump Dashboard tov2.9.1-rc8
rancher#46947