HOW TO: CREATE THE [email protected] FORMULA
- ~/repos/binary-releases (https://github.com/JuulLabs-OSS/binary-releases)
- ~/repos/homebrew-mynewt (https://github.com/JuulLabs-OSS/homebrew-mynewt)
- ~/go/src/mynewt.apache.org/newt (https://github.com/apache/mynewt-newt)
Note: We have to do this by hand rather than with brew install --build-bottle
. This is necessary for the resulting binary to contain the correct git hash in its newt version
output.
cd ~/go/src/mynewt.apache.org/newt
git fetch origin --tags
git checkout mynewt_1_7_0_tag
./build.sh
sudo cp newt/newt /usr/local/Cellar/mynewt-newt
Make sure the resulting build is clean
/usr/local/Cellar/mynewt-newt/newt version
(ensure a git hash is displayed without the word "dirty").
Any directory will do. The remainder of these steps are run from this directory.
mkdir /tmp/newt17
cd /tmp/newt17
brew bottle mynewt-newt
I don't know why, but the bottle filename contains an extra dash. Remove it with the cp
command below.
mkdir -p ~/repos/binary-releases/mynewt-newt-tools_1.7.0
cp mynewt-newt--1.7.0.high_sierra.bottle.tar.gz ~/repos/binary-releases/mynewt-newt-tools_1.7.0/mynewt-newt-1.7.0.high_sierra.bottle.tar.gz
Create a PR from ~/repos/binary-releases/mynewt-newt-tools_1.7.0.
wget https://github.com/apache/mynewt-newt/archive/mynewt_1_7_0_tag.tar.gz
shasum -a 256 mynewt_1_7_0_tag.tar.gz # Remember the output of this command.
- Replace 1.6 with 1.7
- Replace 1_6 with 1_7
- In the
bottle do
block, replace the sha256 with that in the output from thebrew bottle
command. - Replace the top level "sha256" field with the shasum output (previous shell command).
cp /usr/local/Homebrew/Library/Taps/juullabs-oss/homebrew-mynewt/[email protected] /usr/local/Homebrew/Library/Taps/juullabs-oss/homebrew-mynewt/[email protected]
Edit /usr/local/Homebrew/Library/Taps/juullabs-oss/homebrew-mynewt/[email protected].
- Replace 1.6 with 1.7
- Replace 1_6 with 1_7
- In the
bottle do
block, replace the sha256 with that in the output from thebrew bottle
command. - Replace the top level "sha256" field with the shasum output.
- Change MynewtNewtAT16 to MynewtNewtAT17.
cp /usr/local/Homebrew/Library/Taps/juullabs-oss/homebrew-mynewt/mynewt-newt.rb ~/repos/homebrew-mynewt/
cp /usr/local/Homebrew/Library/Taps/juullabs-oss/homebrew-mynewt/[email protected] ~/repos/homebrew-mynewt/
Create a PR from ~/repos/homebrew-mynewt.