kou commented on code in PR #49249:
URL: https://github.com/apache/arrow/pull/49249#discussion_r2814468514


##########
dev/release/02-source-test.rb:
##########
@@ -44,8 +46,13 @@ def source(*targets)
       env["SOURCE_#{target}"] = "1"
     end
     sh(env, @tarball_script, @release_version, "0")
+    Dir.mkdir("artifacts") unless Dir.exist?("artifacts")

Review Comment:
   We can use `FileUtils.mkdir_p` for this. :-)
   
   ```suggestion
       FileUtils.mkdir_p("artifacts")
   ```



##########
dev/release/02-source-test.rb:
##########
@@ -44,8 +46,13 @@ def source(*targets)
       env["SOURCE_#{target}"] = "1"
     end
     sh(env, @tarball_script, @release_version, "0")
+    Dir.mkdir("artifacts") unless Dir.exist?("artifacts")
+    sh("mv", @archive_name, "artifacts/")
+    File.open("artifacts/#{@archive_name}.sha512", "w") do |sha512|
+      sha512.puts(sh(env, "shasum", "-a", "512", "artifacts/#{@archive_name}"))
+    end

Review Comment:
   Ah, sorry. We can simplify this:
   
   ```suggestion
       File.write("artifacts/#{@archive_name}.sha512",
                  sh(env, "shasum", "-a", "512", "artifacts/#{@archive_name}"))
   ```



##########
dev/release/02-source-test.rb:
##########
@@ -15,6 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
+require 'digest'

Review Comment:
   Ah, sorry. could you move this to `dev/release/test-helper.rb`? Our tests 
collect all `require`s to the file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to