8000 build: update brew instructions for old formula, fixes #7297 by stasadev · Pull Request #7295 · ddev/ddev · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

build: update brew instructions for old formula, fixes #7297 #7295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 15, 2025

Conversation

stasadev
Copy link
Member
@stasadev stasadev commented May 15, 2025

The Issue

See:

How This PR Solves The Issue

initialize doesn't seem to know about uninstall. And moving the check to install didn't help.

We can remove the formula repo before removing the ddev binary.

Manual Testing Instructions

brew install drud/ddev/ddev
cd "$(brew --repo drud/homebrew-ddev)"
git reset --hard HEAD~1
brew install drud/ddev/ddev
cd ~
brew update
brew uninstall -f ddev
# old error here (see the updated instructions below in ddev-test example)

rm -rf "$(brew --repo drud/homebrew-ddev)"
brew uninstall -f ddev
brew install ddev/ddev/ddev

Testing the instructions update in ddev-test:

brew install ddev-test/ddev-edge/ddev
cd "$(brew --repo ddev-test/homebrew-ddev-edge)"

# install old version version without the check for old formula
brew install ddev-test/ddev-edge/ddev
git checkout c1d0f9b725a50ddd58043ca3b7d4f01d9b61aecf
$ ddev -v
ddev version v1.23.31

cd ~
brew update

$ brew uninstall -f ddev
Error: ERROR: your homebrew tap is the ancient ddev-test/homebrew-ddev-edge,
but that repository has moved.
Please run:
  rm -rf "$(brew --repo ddev-test/homebrew-ddev-edge)"
  brew uninstall -f ddev
  brew install ddev/ddev-edge/ddev

rm -rf "$(brew --repo ddev-test/homebrew-ddev-edge)"
brew uninstall -f ddev
# should succeed

Automated Testing Overview

Release/Deployment Notes

@stasadev stasadev requested a review from a team as a code owner May 15, 2025 12:11
@stasadev
Copy link
Member Author
stasadev commented May 15, 2025

This change needs a test release in ddev-test, because I don't know if we need to escape " and $.

https://github.com/ddev-test/ddev/releases/tag/v1.23.44

@stasadev stasadev changed the title build: update brew instructions for old formula, for ddev/homebrew-ddev#50 build: update brew instructions for old formula, fixes #7297 May 15, 2025
Copy link
Member
@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

8000

@rfay
Copy link
Member
rfay commented May 15, 2025

Oh, I think the introduction of the ddev-edge was due to a complaint in the goreleaser output, please check that before long, maybe with a test release in ddev-test.

@stasadev
Copy link
Member Author

Oh, I think the introduction of the ddev-edge was due to a complaint in the goreleaser output, please check that before long, maybe with a test release in ddev-test.

https://github.com/ddev-test/ddev/actions/runs/15045410050/job/42286949180

  • homebrew tap formula
    • writing                                        formula=dist/homebrew/Formula/ddev.rb
    • writing                                        formula=dist/homebrew/Formula/ddev.rb
    • artifact already present in the list           name=ddev.rb
      details=
      │ this might cause errors when publishing
      │ please make sure your configuration is correct

I think we can ignore it.

@stasadev
Copy link
Member Author

Oh wait, now both files are the same:

https://github.com/ddev-test/homebrew-ddev/blob/master/Formula/ddev.rb
https://github.com/ddev-test/homebrew-ddev-edge/blob/master/Formula/ddev.rb

So we have to name it differently.

I'll create a symlink in homebrew-ddev-edge, and test it.

@stasadev stasadev force-pushed the 20250515_stasadev_goreleaser branch from b15f189 to 13ba20d Compare May 15, 2025 16:38
@stasadev
Copy link
Member Author
stasadev commented May 15, 2025

Symlink doesn't work:

Expected to find class Ddev, but only found: DdevEdge.

The correct formula will be:

brew install ddev/ddev-edge/ddev-edge

@stasadev stasadev merged commit e285d09 into ddev:main May 15, 2025
9 checks passed
@stasadev stasadev deleted the 20250515_stasadev_goreleaser branch May 15, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0