Release version 2.0.0 on Homebrew
JohnSundell opened this issue Β· 8 comments
Version 2.0.0 has been released, but requires an update on Homebrew. I must admit I have no idea to do that - anyone wants to help out? π
Took a few minutes to check this out, as I have never done it before.
According to the homebrew docs all that is needed, is a commit with the new version in the homebrew formula, and the sha256 of that file.
...
url "https://github.com/JohnSundell/Marathon/archive/2.0.0.tar.gz"
sha256 "51ca9bc5c67781ecdccb81bfdb4d424c0271cba7c19d4b7b06fda6a23b8a7d08"
...
Currently I would be ready to release. Unfortunately I tried this locally, but the error (error: package at 'path/to/marathon/script' requires a minimum Swift tools version of 4.0.2 (currently 4.0.0)) still occurs.
Maybe I am doing something wrong, any guidance would be appreciated.
Provided nothing else changes such as dependencies or the build steps, you should be able to automatically open a PR for Homebrew using the bump-formula-pr command.
E.g. for 2.0:
brew bump-formula-pr --audit --url=https://github.com/JohnSundell/Marathon/archive/2.0.0.tar.gz --sha256=51ca9bc5c67781ecdccb81bfdb4d424c0271cba7c19d4b7b06fda6a23b8a7d08
To ensure that your PR only contains stuff related to the formula you are trying to bump, it might be a good idea to run βbrew doctorβ and resolving any relevant issues first.
brew bump-formula-pr --help has more information.
@choli @DavidNielsen Thanks a lot for helping out with this π Marathon now requires Xcode 9.0, so that will need to be changed in the Homebrew specification as far as I know. There's still an issue migrating from earlier versions of Xcode to Xcode 9.1, since the package cache still remains which causes the error you mention @choli. Will take a look at that soon π
The test block fails on a sandbox violation. So you'll want to fix that before opening the pull request.
==> brew test marathon-swift --verbose
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/marathon-swift.rb
Testing marathon-swift
/usr/bin/sandbox-exec -f /tmp/homebrew20171124-99111-6zl0xn.sb /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/marathon-swift.rb --verbose
/usr/local/Homebrew/Library/Homebrew/test.rb (Formulary::FromPathLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/marathon-swift.rb
==> /usr/local/Cellar/marathon-swift/2.0.0/bin/marathon create helloWorld import Foundation; print("Hello World") --no-xcode --no-open
π£ Created script at helloWorld.swift
==> /usr/local/Cellar/marathon-swift/2.0.0/bin/marathon run helloWorld
π₯ Failed to update packages
π Make sure you have write permissions to the folder '/tmp/marathon-swift-test-20171124-99112-f663h6/.marathon/Packages/'
/usr/local/Homebrew/Library/Homebrew/test.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb
It definitely has write access to that directory so the EPERM is coming from somewhere else contrary to the message.
Without the sandbox,
$ brew test marathon-swift --verbose --no-sandbox
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/marathon-swift.rb
Testing marathon-swift
/usr/local/Homebrew/Library/Homebrew/test.rb (Formulary::FromPathLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/marathon-swift.rb
==> /usr/local/Cellar/marathon-swift/2.0.0/bin/marathon create helloWorld import Foundation; print("Hello World") --no-xcode --no-open
π£ Created script at helloWorld.swift
==> /usr/local/Cellar/marathon-swift/2.0.0/bin/marathon run helloWorld
Hello World
This is a regression from 1.0.1, which was fine.
This is still a problem in 2.0.1
Interesting. This affects 1.0.1 as well. I'm guessing the regression is specific to Xcode 9 because it didn't affect the original formula, which shipped before the Xcode 9 release.
Hey @JohnSundell, is anyone working on updating the brew spec? If not, I can open the PR.
Still an issue with 3.2.0.