You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/21 19:33:59 UTC

[GitHub] [arrow-rs] alamb commented on a change in pull request #1467: Update release scripts to automatically clean up old release versions

alamb commented on a change in pull request #1467:
URL: https://github.com/apache/arrow-rs/pull/1467#discussion_r831475084



##########
File path: dev/release/remove-old-releases.sh
##########
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This script removes all but the most recent versions of arrow-rs
+# from svn
+#
+# The older versions are in SVN history as well as available on the
+# archive page https://archive.apache.org/dist/
+#
+# See
+# https://infra.apache.org/release-download-pages.html
+
+set -e
+set -u
+
+svn_base="https://dist.apache.org/repos/dist/release/arrow"
+
+echo "Remove all but the most recent version"
+old_releases=$(
+  svn ls ${svn_base} | \
+  grep -E '^arrow-rs-[0-9\.]+' | \
+  sort --version-sort --reverse | \
+  tail -n +2
+)
+for old_release_version in $old_releases; do
+  echo "Remove old release ${old_release_version}"
+  svn delete ${svn_base}/${old_release_version}

Review comment:
       This way, at least for me, the script opens my `$EDITOR` so I can double check what is about to be deleted.
   
   Though I suppose I could just add a `-m` 🤔 

##########
File path: dev/release/release-tarball.sh
##########
@@ -68,5 +71,9 @@ svn ci -m "Apache Arrow Rust ${version}" ${tmp_dir}/release
 echo "Clean up"
 rm -rf ${tmp_dir}
 
-echo "Success! The release is available here:"
+echo "Success!"
+echo "The release is available here:"

Review comment:
       this extra newline is a conceit -- so I can copy/paste the output easier into the "release approved" emails




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org