diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a4c09c366..908ce2930 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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 @@ -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) diff --git a/CHANGELOG.md b/CHANGELOG.md index ead81502b..c7f66c12a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/Cargo.lock b/Cargo.lock index f1800593b..16c0cad9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -398,7 +398,7 @@ dependencies = [ [[package]] name = "axoproject" -version = "1.0.6" +version = "1.0.7" dependencies = [ "axoasset", "axoprocess", @@ -1131,7 +1131,7 @@ dependencies = [ [[package]] name = "dist" -version = "1.0.6" +version = "1.0.7" dependencies = [ "axoasset", "axocli", @@ -1182,7 +1182,7 @@ dependencies = [ [[package]] name = "dist-schema" -version = "1.0.6" +version = "1.0.7" dependencies = [ "camino", "gazenot", diff --git a/Cargo.toml b/Cargo.toml index ab494be1b..428489db9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/cargo-dist/src/backend/installer/homebrew.rs b/cargo-dist/src/backend/installer/homebrew.rs index b9d9ef58f..18def074f 100644 --- a/cargo-dist/src/backend/installer/homebrew.rs +++ b/cargo-dist/src/backend/installer/homebrew.rs @@ -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); diff --git a/cargo-dist/templates/installer/homebrew.rb.j2 b/cargo-dist/templates/installer/homebrew.rb.j2 index da94fd764..721b9a839 100644 --- a/cargo-dist/templates/installer/homebrew.rb.j2 +++ b/cargo-dist/templates/installer/homebrew.rb.j2 @@ -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 diff --git a/cargo-dist/tests/snapshots/akaikatana_two_completion_cmds.snap b/cargo-dist/tests/snapshots/akaikatana_two_completion_cmds.snap index 02c0276b6..39568850c 100644 --- a/cargo-dist/tests/snapshots/akaikatana_two_completion_cmds.snap +++ b/cargo-dist/tests/snapshots/akaikatana_two_completion_cmds.snap @@ -1391,10 +1391,17 @@ class AkaikatanaRepack < Formula end install_binary_aliases! - generate_completions_from_executable(bin/"akextract", - "completions", shell_parameter_format: :flag, shells: [:bash, :fish, :zsh]) - generate_completions_from_executable(bin/"akmetadata", - shell_parameter_format: :clap, shells: [:bash, :fish, :pwsh, :zsh]) + generate_completions_from_executable( + bin/"akextract", + "completions", + shell_parameter_format: :flag, + shells: [:bash, :fish, :zsh], + ) + generate_completions_from_executable( + bin/"akmetadata", + shell_parameter_format: :clap, + shells: [:bash, :fish, :pwsh, :zsh], + ) # Homebrew will automatically install these, so we don't need to do that doc_files = Dir["README.*", "readme.*", "LICENSE", "LICENSE.*", "CHANGELOG.*"] diff --git a/dist-workspace.toml b/dist-workspace.toml index c58ecfc4c..01bb468d3 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -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