File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ homebrew_casks:
4545 skip_upload : auto
4646 repository :
4747 owner : " {{ .Env.GITHUB_REPOSITORY_OWNER }}"
48- name : ' {{ trimPrefix (print .Env.GITHUB_REPOSITORY_OWNER "/") .Env.GITHUB_REPOSITORY }}'
48+ name : ' {{ trimprefix .Env.GITHUB_REPOSITORY (print .Env.GITHUB_REPOSITORY_OWNER "/") }}'
4949
5050scoops :
5151 - name : squad-oc
@@ -55,7 +55,7 @@ scoops:
5555 skip_upload : auto
5656 repository :
5757 owner : " {{ .Env.GITHUB_REPOSITORY_OWNER }}"
58- name : ' {{ trimPrefix (print .Env.GITHUB_REPOSITORY_OWNER "/") .Env.GITHUB_REPOSITORY }}'
58+ name : ' {{ trimprefix .Env.GITHUB_REPOSITORY (print .Env.GITHUB_REPOSITORY_OWNER "/") }}'
5959
6060winget :
6161 - name : squad-oc
@@ -74,4 +74,4 @@ winget:
7474 - squad
7575 repository :
7676 owner : " {{ .Env.GITHUB_REPOSITORY_OWNER }}"
77- name : ' {{ trimPrefix (print .Env.GITHUB_REPOSITORY_OWNER "/") .Env.GITHUB_REPOSITORY }}'
77+ name : ' {{ trimprefix .Env.GITHUB_REPOSITORY (print .Env.GITHUB_REPOSITORY_OWNER "/") }}'
Original file line number Diff line number Diff line change @@ -103,6 +103,12 @@ func TestGoreleaserGeneratesPackaging(t *testing.T) {
103103 if strings .Contains (s , "directory: Formula" ) {
104104 t .Error ("cask must not use Formula/" )
105105 }
106+ if strings .Contains (s , "trimPrefix" ) {
107+ t .Error ("GoReleaser templates use trimprefix, not Sprig trimPrefix" )
108+ }
109+ if ! strings .Contains (s , "trimprefix" ) {
110+ t .Error (".goreleaser.yaml should use trimprefix for the repo name" )
111+ }
106112}
107113
108114func TestReleaseWorkflowOpensOnePackagingPR (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments