Repository: tetratelabs/getenvoy
Pull request #241 (2021-05-25 12:04:23)

Disables auto-changelog and uses more defaults in goreleaser
Changes from defaults should be commented or removed

codefromthecrypt: I noticed our release pipeline is backwards. We release before e2e testing the binary we made. We should do "goreleaser build" then "make e2e" then "goreleaser release" I think
mathetake: > I noticed our release pipeline is backwards. We release before e2e testing the binary we made. We should do "goreleaser build" then "make e2e" then "goreleaser release" I think

I think this is intentional in order to test the "uploaded" binary works correctly vs testing the locally built binary.. 
mathetake: testing the locally built binary in the release workflow is basically a duplication of the e2e in the main branch's workflow..
codefromthecrypt: I'll save the e2e on release refactoring for a different PR, but glad the conversation started. We should be testing the binary we built "before" releasing it ideally. ex "goreleaser build" only after e2e "goreleaser release". The only test we should need to do post-release is that the tar made as an attachment to the releases page. The tar would have exactly the same bytes as we tested.
mathetake: yeah maybe be testing shasum is enough for post release. Thanks.

Patch:
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 1359f09..712ff5e 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -12,9 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# See http://goreleaser.com for valid values
 project_name: getenvoy
 builds:
   - binary: getenvoy
+    # Updates the version so that `getenvoy -v` prints out the release version instead of "dev"
     ldflags: "-s -w -X github.com/tetratelabs/getenvoy/internal/version.GetEnvoy={{.Version}}"
     main: .
     env:
@@ -25,19 +27,12 @@ builds:
     goarch:
       - amd64
       - arm64
-checksum:
-  name_template: 'checksums.txt'
-snapshot:
-  name_template: "{{ .Version }}-next-{{ .ShortCommit }}"
-changelog:
-  sort: asc
-  filters:
-    exclude:
-      - docs
-      - test
-      - goreleaser
+release:
+  # Create a draft release in GitHub. We can write release notes manually.
+  draft: true
 brews:
-  - tap:
+  - name: getenvoy
+    tap:
       owner: tetratelabs
       name: homebrew-getenvoy
       # Use token other than the default one (which is limited in scope to
@@ -45,6 +40,9 @@ brews:
       token: "{{ .Env.HOMEBREW_GETENVOY_GITHUB_TOKEN }}"
     folder: Formula
     homepage: https://github.com/tetratelabs/getenvoy
-    description: Distribute, deploy and operate a fleet of Envoys
+    description: Install and run Envoy
+    license: Apache-2.0
+    install: |  # TODO: add shell completion post-install
+      bin.install "getenvoy"
     test: |
-      system "#{bin}/getenvoy --help"
+      system "#{bin}/getenvoy -v"
diff --git a/internal/cmd/app.go b/internal/cmd/app.go
index ceeb445..342202b 100644
--- a/internal/cmd/app.go
+++ b/internal/cmd/app.go
@@ -35,7 +35,7 @@ func NewApp(o *globals.GlobalOpts) *cli.App {
 	app.Name = "getenvoy"
 	app.HelpName = "getenvoy"
 	app.HideHelpCommand = true
-	app.Usage = `Download and run Envoy`
+	app.Usage = `Install and run Envoy`
 	app.Version = version.GetEnvoy
 	app.Flags = []cli.Flag{
 		&cli.StringFlag{


Test patch:
diff --git a/internal/cmd/testdata/getenvoy.md b/internal/cmd/testdata/getenvoy.md
index 02da569..172d350 100644
--- a/internal/cmd/testdata/getenvoy.md
+++ b/internal/cmd/testdata/getenvoy.md
@@ -1,6 +1,6 @@
 # NAME
 
-getenvoy - Download and run Envoy
+getenvoy - Install and run Envoy
 
 # SYNOPSIS
 
diff --git a/internal/cmd/testdata/getenvoy_help.txt b/internal/cmd/testdata/getenvoy_help.txt
index 61b8757..744f04f 100644
--- a/internal/cmd/testdata/getenvoy_help.txt
+++ b/internal/cmd/testdata/getenvoy_help.txt
@@ -1,5 +1,5 @@
 NAME:
-   getenvoy - Download and run Envoy
+   getenvoy - Install and run Envoy
 
 USAGE:
    getenvoy [global options] command [command options] [arguments...]