Skip to content

Commit

Permalink
Move homebrew formulae inside dev/tasks. Update autobrew package vers…
Browse files Browse the repository at this point in the history
…ion in release script
  • Loading branch information
nealrichardson committed Sep 20, 2019
1 parent ff1489e commit 1d6512b
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 28 deletions.
6 changes: 3 additions & 3 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1838,16 +1838,16 @@ for PyArrow. Ibis is released under the Apache License, Version 2.0.

This project includes code from the autobrew project.

* r/tools/autobrew and r/tools/apache-arrow.rb are based on code
from the autobrew project.
* r/tools/autobrew and dev/tasks/homebrew-formulae/apache-arrow-autobrew.rb
are based on code from the autobrew project.

Copyright: Copyright (c) 2017 - 2019, Jeroen Ooms.
All rights reserved.
Homepage: https://github.com/jeroen/autobrew

--------------------------------------------------------------------------------

ci/apache-arrow.rb has the following license:
dev/tasks/homebrew-formulae/apache-arrow.rb has the following license:

BSD 2-Clause License

Expand Down
42 changes: 28 additions & 14 deletions dev/release/00-prepare-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,6 @@ def test_update_version_pre_tag
"+pkgver=#{@release_version}"],
],
},
{
path: "ci/apache-arrow.rb",
hunks: [
["- url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@snapshot_version}/apache-arrow-#{@snapshot_version}.tar.gz\"",
"+ url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@release_version}/apache-arrow-#{@release_version}.tar.gz\""],
],
},
{
path: "cpp/CMakeLists.txt",
hunks: [
Expand All @@ -113,6 +106,20 @@ def test_update_version_pre_tag
"+ <Version>#{@release_version}</Version>"],
],
},
{
path: "dev/tasks/homebrew-formulae/apache-arrow.rb",
hunks: [
["- url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@snapshot_version}/apache-arrow-#{@snapshot_version}.tar.gz\"",
"+ url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@release_version}/apache-arrow-#{@release_version}.tar.gz\""],
],
},
{
path: "dev/tasks/homebrew-formulae/apache-arrow-autobrew.rb",
hunks: [
["- url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@previous_version}.9000/apache-arrow-#{@previous_version}.9000.tar.gz\"",
"+ url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@release_version}/apache-arrow-#{@release_version}.tar.gz\""],
],
},
{
path: "js/package.json",
hunks: [
Expand Down Expand Up @@ -255,13 +262,6 @@ def test_update_version_post_tag
"+pkgver=#{@release_version}.9000"],
],
},
{
path: "ci/apache-arrow.rb",
hunks: [
["- url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@release_version}/apache-arrow-#{@release_version}.tar.gz\"",
"+ url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@next_snapshot_version}/apache-arrow-#{@next_snapshot_version}.tar.gz\""],
],
},
{
path: "cpp/CMakeLists.txt",
hunks: [
Expand All @@ -276,6 +276,20 @@ def test_update_version_post_tag
"+ <Version>#{@next_snapshot_version}</Version>"],
],
},
{
path: "dev/tasks/homebrew-formulae/apache-arrow.rb",
hunks: [
["- url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@release_version}/apache-arrow-#{@release_version}.tar.gz\"",
"+ url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@next_snapshot_version}/apache-arrow-#{@next_snapshot_version}.tar.gz\""],
],
},
{
path: "dev/tasks/homebrew-formulae/apache-arrow-autobrew.rb",
hunks: [
["- url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@release_version}/apache-arrow-#{@release_version}.tar.gz\"",
"+ url \"https://www.apache.org/dyn/closer.cgi?path=arrow/arrow-#{@release_version}.9000/apache-arrow-#{@release_version}.9000.tar.gz\""],
],
},
{
path: "js/package.json",
hunks: [
Expand Down
18 changes: 13 additions & 5 deletions dev/release/00-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ update_versions() {
PKGBUILD
rm -f PKGBUILD.bak
git add PKGBUILD
sed -i.bak -E -e \
"s/arrow-[0-9.\-]+[0-9SNAPHOT]+/arrow-${version}/g" \
apache-arrow.rb
rm -f apache-arrow.rb.bak
git add apache-arrow.rb
cd -

cd "${SOURCE_DIR}/../../cpp"
Expand All @@ -82,6 +77,19 @@ update_versions() {
git add Directory.Build.props
cd -

cd "${SOURCE_DIR}/../../dev/tasks/homebrew-formulae"
sed -i.bak -E -e \
"s/arrow-[0-9.\-]+[0-9SNAPHOT]+/arrow-${version}/g" \
apache-arrow.rb
rm -f apache-arrow.rb.bak
git add apache-arrow.rb
sed -i.bak -E -e \
"s/arrow-[0-9.]+[0-9]+/arrow-${r_version}/g" \
apache-arrow-autobrew.rb
rm -f apache-arrow-autobrew.rb.bak
git add apache-arrow-autobrew.rb
cd -

cd "${SOURCE_DIR}/../../js"
sed -i.bak -E -e \
"s/^ \"version\": \".+\"/ \"version\": \"${version}\"/" \
Expand Down
2 changes: 1 addition & 1 deletion dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*.json
*.snap
.github/ISSUE_TEMPLATE.md
ci/apache-arrow.rb
cpp/CHANGELOG_PARQUET.md
cpp/src/arrow/io/mman.h
cpp/src/arrow/util/random.h
Expand All @@ -33,6 +32,7 @@ cpp/src/plasma/thirdparty/ae/config.h
cpp/src/plasma/thirdparty/ae/zmalloc.h
cpp/src/plasma/thirdparty/dlmalloc.c
dev/release/rat_exclude_files.txt
dev/tasks/homebrew-formulae/apache-arrow.rb
dev/tasks/linux-packages/debian.ubuntu-xenial/compat
dev/tasks/linux-packages/debian.ubuntu-xenial/control
dev/tasks/linux-packages/debian.ubuntu-xenial/gir1.2-arrow-1.0.install
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dev/tasks/homebrew-formulae/travis.osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if: tag IS blank
env:
global:
- TRAVIS_TAG={{ task.tag }}
- ARROW_FORMULA=./arrow/{{ formula }}
- ARROW_FORMULA=./arrow/dev/tasks/homebrew-formulae/{{ formula }}

before_script:
- git clone --no-checkout {{ arrow.remote }} arrow
Expand Down
4 changes: 2 additions & 2 deletions dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1094,14 +1094,14 @@ tasks:
platform: osx
template: homebrew-formulae/travis.osx.yml
params:
formula: ci/apache-arrow.rb
formula: apache-arrow.rb

homebrew-cpp-autobrew:
ci: travis
platform: osx
template: homebrew-formulae/travis.osx.yml
params:
formula: r/tools/apache-arrow.rb
formula: apache-arrow-autobrew.rb

############################## Gandiva Tasks ################################

Expand Down
6 changes: 4 additions & 2 deletions r/configure
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ if [ "$ARROW_R_DEV" == "TRUE" ]; then
fi

if [ "$LOCAL_AUTOBREW" == "TRUE" ]; then
# LOCAL_AUTOBREW means use the formula in tools/
# LOCAL_AUTOBREW means use the script in tools/
# If you want to use a local apache-arrow.rb formula, do:
# $ cp ../dev/tasks/homebrew-formulae/apache-arrow-autobrew.rb apache-arrow.rb
# (assuming a local checkout of the apache/arrow repository)
# FORCE_AUTOBREW without LOCAL_AUTOBREW means to pull from jeroen.github.io
cp tools/autobrew .
cp tools/apache-arrow.rb .
FORCE_AUTOBREW="TRUE"
fi

Expand Down

0 comments on commit 1d6512b

Please sign in to comment.