mercari / hcledit

Go package to edit HCL configuration
MIT License
44 stars 13 forks source link

Brew install not working #113

Open AshkanYarmoradi opened 4 months ago

AshkanYarmoradi commented 4 months ago

Hello team,

When i go with instructor of install hcledit cmd using brew I face with error Error: mercari/hcledit/hcledit: wrong number of arguments (given 1, expected 0)

Steps that I execute in my terminal:

OS and System: Mac OS M2

suzuki-shunsuke commented 2 months ago

Thank you for your report. I could reproduce the issue.

We have released new versions, but formula wasn't updated. https://github.com/mercari/hcledit/blob/main/Formula/hcledit.rb

Formula should have been updated by GoReleaser.

https://github.com/mercari/hcledit/blob/dd2a67f306af4db582934ffb5080a61cdc2bb2ca/.goreleaser.yml#L38-L44

The latest release workflow failed.

https://github.com/mercari/hcledit/actions/runs/9574541574/job/26397944699#step:5:89

  ⨯ release failed after 1m8s                error=1 error occurred:
    * homebrew tap formula: could not update "Formula/hcledit.rb": PUT https://api.github.com/repos/mercari/hcledit/contents/Formula/hcledit.rb: 409 Could not update file: Commits must have verified signatures. Changes must be made through a pull request. []
suzuki-shunsuke commented 2 months ago

Oh, I see. GoReleaser tried to push a commit to the main branch directly, but it failed due to the branch protection rule.

suzuki-shunsuke commented 2 months ago

Unfortunately, GitHub Actions can't be added to the bypass list.

So there are some options.

  1. Separate tap repository and disable some rules on the repository
  2. Use GitHub App or PAT instead of GitHub Actions token to release tap.
ryan-ph commented 1 month ago

It seems we can update the goreleaser config to have it open PRs instead of merging directly to trunk. Let me update the GHA token permissions and update the goreleaser config.