Skip to content

Commit

Permalink
updated Help content and test file
Browse files Browse the repository at this point in the history
  • Loading branch information
mguptahub committed Sep 5, 2024
1 parent c5e5620 commit 668c8d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Flags:
-t, --token string GitHub Auth Token
--make-release-latest bool Mark the created GitHub release as 'latest' (default "true")
--packages-with-index Host the package files in the GitHub Pages branch
--prerelease Mark this as 'Pre-release'
--prerelease Mark this as 'Pre-release' (default: false)

Global Flags:
--config string Config file (default is $HOME/.cr.yaml)
Expand Down
2 changes: 1 addition & 1 deletion cr/cmd/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ func init() {
uploadCmd.Flags().Bool("push", false, "Push the chart package to the GitHub Pages branch (must not be set if --pr is set)")
uploadCmd.Flags().Bool("pr", false, "Create a pull request for the chart package against the GitHub Pages branch (must not be set if --push is set)")
uploadCmd.Flags().Bool("packages-with-index", false, "Host the package files in the GitHub Pages branch")
uploadCmd.Flags().Bool("prerelease", false, "Mark this as 'Pre-release'")
uploadCmd.Flags().Bool("prerelease", false, "Mark this as 'Pre-release' (default: false)")
}
2 changes: 1 addition & 1 deletion doc/cr_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cr upload [flags]
--packages-with-index Host the package files in the GitHub Pages branch
--pages-branch string The GitHub pages branch (default "gh-pages")
--pr Create a pull request for the chart package against the GitHub Pages branch (must not be set if --push is set)
--prerelease Mark this as 'Pre-release'
--prerelease Mark this as 'Pre-release' (default: false)
--push Push the chart package to the GitHub Pages branch (must not be set if --pr is set)
--release-name-template string Go template for computing release names, using chart metadata (default "{{ .Name }}-{{ .Version }}")
--release-notes-file string Markdown file with chart release notes. If it is set to empty string, or the file is not found, the chart description will be used instead. The file is read from the chart package
Expand Down
6 changes: 6 additions & 0 deletions pkg/releaser/releaser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ func TestReleaser_CreateReleases(t *testing.T) {
version string
commit string
latest string
prerelease bool
Releaser *Releaser
error bool
}{
Expand All @@ -379,6 +380,7 @@ func TestReleaser_CreateReleases(t *testing.T) {
Commit: "",
PackagesWithIndex: false,
MakeReleaseLatest: true,
Prerelease: false,
},
},
error: true,
Expand All @@ -396,6 +398,7 @@ func TestReleaser_CreateReleases(t *testing.T) {
Commit: "",
PackagesWithIndex: false,
MakeReleaseLatest: true,
Prerelease: false,
},
},
error: false,
Expand All @@ -413,6 +416,7 @@ func TestReleaser_CreateReleases(t *testing.T) {
Commit: "5e239bd19fbefb9eb0181ecf0c7ef73b8fe2753c",
PackagesWithIndex: false,
MakeReleaseLatest: true,
Prerelease: false,
},
},
error: false,
Expand All @@ -431,6 +435,7 @@ func TestReleaser_CreateReleases(t *testing.T) {
PackagesWithIndex: true,
Push: true,
MakeReleaseLatest: true,
Prerelease: false,
},
},
error: false,
Expand Down Expand Up @@ -467,6 +472,7 @@ func TestReleaser_CreateReleases(t *testing.T) {
assert.Equal(t, assetPath, fakeGitHub.release.Assets[0].Path)
assert.Equal(t, tt.commit, fakeGitHub.release.Commit)
assert.Equal(t, tt.latest, fakeGitHub.release.MakeLatest)
assert.Equal(t, tt.prerelease, fakeGitHub.release.Prerelease)
assert.Equal(t, tt.Releaser.config.Commit, fakeGitHub.release.Commit)
fakeGitHub.AssertNumberOfCalls(t, "CreateRelease", 1)
}
Expand Down

0 comments on commit 668c8d2

Please sign in to comment.