Skip to content

Commit

Permalink
ARROW-5077: [Rust] Change Cargo.toml to use release versions
Browse files Browse the repository at this point in the history
Author: Yosuke Shiro <[email protected]>

Closes apache#4460 from shiro615/release-change-cargo-toml and squashes the following commits:

e500915 <Yosuke Shiro> Remove { version = ... }
e0bacdb <Yosuke Shiro> Refactor
94483dc <Yosuke Shiro>  Change Cargo.toml to use release versions
  • Loading branch information
shiro615 authored and kou committed Jun 4, 2019
1 parent f22aee6 commit 272866f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dev/release/00-prepare-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ def test_update_version_pre_tag
hunks: [
["-version = \"#{@snapshot_version}\"",
"+version = \"#{@release_version}\""],
["-arrow = { path = \"../arrow\" }",
"-parquet = { path = \"../parquet\" }",
"+arrow = \"#{@release_version}\"",
"+parquet = \"#{@release_version}\""]
],
},
{
Expand All @@ -198,6 +202,8 @@ def test_update_version_pre_tag
hunks: [
["-version = \"#{@snapshot_version}\"",
"+version = \"#{@release_version}\""],
["-arrow = { path = \"../arrow\" }",
"+arrow = \"#{@release_version}\""]
],
},
{
Expand Down Expand Up @@ -327,6 +333,10 @@ def test_update_version_post_tag
hunks: [
["-version = \"#{@release_version}\"",
"+version = \"#{@next_version}-SNAPSHOT\""],
["-arrow = \"#{@release_version}\"",
"-parquet = \"#{@release_version}\"",
"+arrow = { path = \"../arrow\" }",
"+parquet = { path = \"../parquet\" }"]
],
},
{
Expand All @@ -341,6 +351,8 @@ def test_update_version_post_tag
hunks: [
["-version = \"#{@release_version}\"",
"+version = \"#{@next_version}-SNAPSHOT\""],
["-arrow = \"#{@release_version}\"",
"+arrow = { path = \"../arrow\" }"]
],
},
{
Expand Down
11 changes: 11 additions & 0 deletions dev/release/00-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ update_versions() {
sed -i.bak -E -e \
"s/^version = \".+\"/version = \"${version}\"/g" \
*/Cargo.toml
if [ ${type} = "snapshot" ]; then
sed -i.bak -E \
-e "s/^arrow = \".+\"/arrow = { path = \"..\/arrow\" }/g" \
-e "s/^parquet = \".+\"/parquet = { path = \"..\/parquet\" }/g" \
*/Cargo.toml
else
sed -i.bak -E \
-e "s/^arrow = \{ path = \".+\" \}/arrow = \"${version}\"/g" \
-e "s/^parquet = \{ path = \".+\" \}/parquet = \"${version}\"/g" \
*/Cargo.toml
fi
rm -f */Cargo.toml.bak
git add */Cargo.toml

Expand Down

0 comments on commit 272866f

Please sign in to comment.