Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
# we specify bash to get pipefail; it guards against the `curl` command
# failing. otherwise `sh` won't catch that `curl` returned non-0
shell: bash
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/oxidecomputer/cargo-dist/releases/download/v1.0.5/dist-installer.sh | sh"
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/oxidecomputer/cargo-dist/releases/download/v1.0.6/dist-installer.sh | sh"
- name: Cache dist
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -294,8 +294,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLAN: ${{ needs.plan.outputs.val }}
GITHUB_USER: "axo bot"
GITHUB_EMAIL: "admin+bot@axo.dev"
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
steps:
- uses: actions/checkout@v4
Expand All @@ -313,8 +311,8 @@ jobs:
# so we need to find releases with a *.rb file, and publish with that filename.
- name: Commit formula files
run: |
git config --global user.name "${GITHUB_USER}"
git config --global user.email "${GITHUB_EMAIL}"
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"

for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith(".rb")] | any)'); do
filename=$(echo "$release" | jq '.artifacts[] | select(endswith(".rb"))' --raw-output)
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Nothing Yet!

# Version 1.0.7 (2025-07-04)

- Fix long lines in Homebrew formula.

# Version 1.0.6 (2025-07-04)

- Change committer of Homebrew formulas to the owner of GITHUB_TOKEN.
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/oxidecomputer/cargo-dist"
homepage = "https://opensource.axo.dev/cargo-dist/"
version = "1.0.6"
version = "1.0.7"
rust-version = "1.88"

[workspace.dependencies]
# intra-workspace deps (you need to bump these versions when you cut releases too!
dist-schema = { version = "=1.0.6", path = "cargo-dist-schema" }
axoproject = { version = "=1.0.6", path = "axoproject", default-features = false, features = ["cargo-projects", "generic-projects", "npm-projects"] }
dist-schema = { version = "=1.0.7", path = "cargo-dist-schema" }
axoproject = { version = "=1.0.7", path = "axoproject", default-features = false, features = ["cargo-projects", "generic-projects", "npm-projects"] }

# vendored first-party deps
axocli = { version = "0.2.0", path = "vendor/axocli" }
Expand Down
6 changes: 4 additions & 2 deletions cargo-dist/src/backend/installer/homebrew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ pub(crate) fn write_homebrew_formula(
};

let completion = match subcommand {
Some(cmd) => format!(" \"{cmd}\", shell_parameter_format: {format}, shells: {shells}"),
None => format!("shell_parameter_format: {format}, shells: {shells}"),
Some(cmd) => format!(
"\"{cmd}\",\n shell_parameter_format: {format},\n shells: {shells},"
),
None => format!("shell_parameter_format: {format},\n shells: {shells},"),
};

completions.insert(bin.clone(), completion);
Expand Down
6 changes: 4 additions & 2 deletions cargo-dist/templates/installer/homebrew.rb.j2
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ class {{ formula_class }} < Formula
install_binary_aliases!

{%- for binary, completion_cmd in completions|items %}
generate_completions_from_executable(bin/"{{ binary }}",
{{ completion_cmd }})
generate_completions_from_executable(
bin/"{{ binary }}",
{{ completion_cmd }}
)
{%- endfor %}

# Homebrew will automatically install these, so we don't need to do that
Expand Down
15 changes: 11 additions & 4 deletions cargo-dist/tests/snapshots/akaikatana_two_completion_cmds.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist-workspace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["cargo:."]
# Config for 'dist'
[dist]
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "1.0.5"
cargo-dist-version = "1.0.6"
# CI backends to support
ci = "github"
# The installers to generate for each app
Expand Down