Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions dev/release/post-11-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def test_version_post_tag
]
end

Dir.glob("go/**/{go.mod,*.go,*.go.*}") do |path|
Dir.glob("go/**/{go.mod,*.go,*.go.*,README.md}") do |path|
if path == "go/arrow/doc.go"
expected_changes << {
path: path,
Expand All @@ -253,19 +253,34 @@ def test_version_post_tag
hunks = []
if release_type == :major
lines = File.readlines(path, chomp: true)
target_lines = lines.grep(/#{Regexp.escape(import_path)}/)
target_lines = lines.each_with_index.select do |line, i|
line.include?(import_path)
end
next if target_lines.empty?
hunk = []
target_lines.each do |line|
hunk << "-#{line}"
n_context_lines = 3 # The default of Git's diff.context
target_hunks = [[target_lines.first[0]]]
previous_i = target_lines.first[1]
target_lines[1..-1].each do |line, i|
if i - previous_i < n_context_lines
target_hunks.last << line
else
target_hunks << [line]
end
previous_i = i
end
target_lines.each do |line|
new_line = line.gsub("v#{@snapshot_major_version}") do
"v#{@next_major_version}"
target_hunks.each do |lines|
hunk = []
lines.each do |line,|
hunk << "-#{line}"
end
lines.each do |line|
new_line = line.gsub("v#{@snapshot_major_version}") do
"v#{@next_major_version}"
end
hunk << "+#{new_line}"
end
hunk << "+#{new_line}"
hunks << hunk
end
hunks << hunk
end
if path == "go/parquet/writer_properties.go"
hunks << [
Expand Down
4 changes: 2 additions & 2 deletions dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ update_versions() {
popd

pushd "${ARROW_DIR}/go"
find . "(" -name "*.go*" -o -name "go.mod" ")" -exec sed -i.bak -E -e \
"s|(github\\.com/apache/arrow/go)/v[0-9]+|\1/v${major_version}|" {} \;
find . "(" -name "*.go*" -o -name "go.mod" -o -name README.md ")" -exec sed -i.bak -E -e \
"s|(github\\.com/apache/arrow/go)/v[0-9]+|\1/v${major_version}|g" {} \;
Copy link
Contributor Author

@tschaub tschaub Sep 18, 2023

Choose a reason for hiding this comment

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

The README.md has two versions of this match on the same line, so I added the g flag to replace both.

# update parquet writer version
sed -i.bak -E -e \
"s/\"parquet-go version .+\"/\"parquet-go version ${version}\"/" \
Expand Down
2 changes: 1 addition & 1 deletion go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Apache Arrow for Go
===================

[![GoDoc](https://godoc.org/github.com/apache/arrow/go/arrow?status.svg)](https://godoc.org/github.com/apache/arrow/go/arrow)
[![Go Reference](https://pkg.go.dev/badge/github.com/apache/arrow/go/v14.svg)](https://pkg.go.dev/github.com/apache/arrow/go/v14)

[Apache Arrow][arrow] is a cross-language development platform for in-memory
data. It specifies a standardized language-independent columnar memory format
Expand Down
6 changes: 3 additions & 3 deletions go/arrow/flight/flightsql/driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ connection pooling, transactions combined with ease of use (see (#usage)).
## Prerequisites

* Go 1.17+
* Installation via `go get -u github.com/apache/arrow/go/v12/arrow/flight/flightsql`
* Installation via `go get -u github.com/apache/arrow/go/v14/arrow/flight/flightsql`
* Backend speaking FlightSQL

---------------------------------------
Expand All @@ -55,7 +55,7 @@ import (
"database/sql"
"time"

_ "github.com/apache/arrow/go/v12/arrow/flight/flightsql"
_ "github.com/apache/arrow/go/v14/arrow/flight/flightsql"
)

// Open the connection to an SQLite backend
Expand Down Expand Up @@ -141,7 +141,7 @@ import (
"log"
"time"

"github.com/apache/arrow/go/v12/arrow/flight/flightsql"
"github.com/apache/arrow/go/v14/arrow/flight/flightsql"
)

func main() {
Expand Down