Repository: axodotdev/cargo-dist
Pull request #340 (2023-08-17 20:51:54)

chore: enable Homebrew installer
Let's enable the Homebrew installer for ourselves now that support has shipped.


Patch:
diff --git a/Cargo.toml b/Cargo.toml
index e254e9d9..3c43d5f4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,7 +17,7 @@ cargo-dist-version = "0.1.0-prerelease.11"
 # CI backends to support (see 'cargo dist generate-ci')
 ci = ["github"]
 # The installers to generate for each app
-installers = ["shell", "powershell"]
+installers = ["shell", "powershell", "homebrew"]
 # Target platforms to build apps for (Rust target-triple syntax)
 targets = ["x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-pc-windows-msvc", "aarch64-apple-darwin"]
 
diff --git a/cargo-dist/templates/ci/github_ci.yml.j2 b/cargo-dist/templates/ci/github_ci.yml.j2
index 9b4c8f21..e114d173 100644
--- a/cargo-dist/templates/ci/github_ci.yml.j2
+++ b/cargo-dist/templates/ci/github_ci.yml.j2
@@ -58,7 +58,7 @@ jobs:
           submodules: recursive
       {{%- if rust_version %}}
       - name: Install Rust
-        run: rustup update {{{ rust_version }}} --no-self-update && rustup default {{{ rust_version }}}"#
+        run: rustup update {{{ rust_version }}} --no-self-update && rustup default {{{ rust_version }}}
       {{%- endif %}}
       - name: Install cargo-dist
         run: {{{ install_dist_sh }}}
@@ -184,4 +184,3 @@ jobs:
       - name: mark release as non-draft
         run: |
           gh release edit ${{ github.ref_name }} --draft=false
-


Test patch:
diff --git a/cargo-dist/tests/snapshots/akaikatana_basic.snap b/cargo-dist/tests/snapshots/akaikatana_basic.snap
index 9e1490c3..e89ad531 100644
--- a/cargo-dist/tests/snapshots/akaikatana_basic.snap
+++ b/cargo-dist/tests/snapshots/akaikatana_basic.snap
@@ -1297,7 +1297,7 @@ jobs:
         with:
           submodules: recursive
       - name: Install Rust
-        run: rustup update "1.67.1" --no-self-update && rustup default "1.67.1""#
+        run: rustup update "1.67.1" --no-self-update && rustup default "1.67.1"
       - name: Install cargo-dist
         run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/vSOME_VERSION/cargo-dist-installer.sh | sh"
       - id: create-release
@@ -1423,4 +1423,3 @@ jobs:
         run: |
           gh release edit ${{ github.ref_name }} --draft=false
 
-
diff --git a/cargo-dist/tests/snapshots/manifest.snap b/cargo-dist/tests/snapshots/manifest.snap
index 48ff0ae4..87b3c050 100644
--- a/cargo-dist/tests/snapshots/manifest.snap
+++ b/cargo-dist/tests/snapshots/manifest.snap
@@ -20,6 +20,7 @@ stdout:
       "artifacts": [
         "cargo-dist-installer.sh",
         "cargo-dist-installer.ps1",
+        "cargo-dist.rb",
         "cargo-dist-aarch64-apple-darwin.tar.xz",
         "cargo-dist-aarch64-apple-darwin.tar.xz.sha256",
         "cargo-dist-x86_64-apple-darwin.tar.xz",
@@ -219,6 +220,16 @@ stdout:
       "target_triples": [
         "x86_64-unknown-linux-gnu"
       ]
+    },
+    "cargo-dist.rb": {
+      "name": "cargo-dist.rb",
+      "kind": "installer",
+      "target_triples": [
+        "aarch64-apple-darwin",
+        "x86_64-apple-darwin"
+      ],
+      "install_hint": "brew install cargo-dist.rb",
+      "description": "Install prebuilt binaries via Homebrew"
     }
   }
 }