-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplates.go
More file actions
80 lines (67 loc) · 3.09 KB
/
templates.go
File metadata and controls
80 lines (67 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package templates
import "github.com/MakeNowJust/heredoc"
// CommandVersionTemplate is the template for the CLI version output.
var CommandVersionTemplate = heredoc.Doc(`
chart-releaser:
version: {{ .Version }}
build date: {{ .BuildDate }}
commit: {{ .Commit }}
tag: {{ .Tag }}
go version: {{ .GoVersion }}
go compiler: {{ .Compiler }}
platform: {{ .OS }}/{{ .Arch }}
`)
// FlagLatestVersionTemplate is the template for the output when the --latest flag is specified.
var FlagLatestVersionTemplate = heredoc.Doc(`
{{ .Status }}
latest: {{ .Latest }}
installed: {{ .Installed }}
`)
// ConfigFileTemplate is the template used to generate a new basic configuration file for
// chart-releaser from the `init` command.
var ConfigFileTemplate = heredoc.Doc(`
{{ .Header }}
version: v1
chart:
name: {{ .Chart }}{{ if .Path }}
path: {{ .Path }}{{ end }}
repo: github.com/{{ .GithubOwner }}/{{ .GithubName }}
commit:
author:
name: {{ .AuthorName }}
email: {{ .AuthorEmail }}
`)
// ConfigHeaderComment is the header comment which is applied to the generated config file.
var ConfigHeaderComment = heredoc.Doc(`
# .chartreleaser.yaml is the configuration file for chart-releaser, a CI tool
# to update Helm Charts on application release. See the documentation at
# https://github.com/edaniszewski/chart-releaser
`)
// DefaultUpdateCommitMessage is the default template for a commit message used when
// updating the Chart file.
var DefaultUpdateCommitMessage = `[{{ .Chart.Name }}] bump chart to {{ .Chart.NewVersion }} for new application release ({{ .App.NewVersion }})`
// DefaultExtrasCommitMessage is the default template for a commit message used when
// updating a file specified in the `extras` config.
var DefaultExtrasCommitMessage = `[{{ .Chart.Name }}] update {{ .CurrentFile.Path }} for new application release ({{ .App.NewVersion }})`
// DefaultPullRequestTitle is a template for the default title used when opening a pull
// request for the updates generated by chart-releaser.
//
// This is only used when the configuration specifies that a pull request should be
// opened after committing any updates.
var DefaultPullRequestTitle = `Bump {{ .Chart.Name }} Chart from {{ .Chart.PreviousVersion }} to {{ .Chart.NewVersion }}`
// DefaultPullRequestBody is a template for the default comment used when opening
// a new pull request, summarizing the changes.
//
// This is only used when the configuration specifies that a pull request should be
// opened after committing any updates.
var DefaultPullRequestBody = heredoc.Doc(`
Bumps the {{ .Chart.Name }} Helm Chart from {{ .Chart.PreviousVersion }} to {{ .Chart.NewVersion }}.
{{ if .Files }}The following files have also been updated:
{{ range .Files }}- {{ .Path }}
{{ end }}{{ end }}
---
*This PR was generated with [chart-releaser](https://github.com/edaniszewski/chart-releaser)*
`)
// DefaultBranchName is a template specifying the default name of the branch to create
// when updating under the "pull request" strategy.
var DefaultBranchName = `chartreleaser/{{ .Chart.Name }}/{{ .Chart.NewVersion }}`