You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2022/10/03 20:52:12 UTC

[arrow-rs] branch master updated: Automate generation of release PRs (#2736)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 35c313ba0 Automate generation of release PRs (#2736)
35c313ba0 is described below

commit 35c313ba068d070c2f1e81f531293655cf5f3bcd
Author: Ian Alexander Joiner <ia...@gmail.com>
AuthorDate: Mon Oct 3 16:52:07 2022 -0400

    Automate generation of release PRs (#2736)
    
    * Add file_release_pr.sh and update README
    
    * fixup
    
    Co-authored-by: Andrew Lamb <an...@nerdnetworks.org>
---
 dev/release/README.md          | 19 +++++++++++++++----
 dev/release/file_release_pr.sh | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 4 deletions(-)

diff --git a/dev/release/README.md b/dev/release/README.md
index 82cb9fbfc..3ee7a7d5e 100644
--- a/dev/release/README.md
+++ b/dev/release/README.md
@@ -67,7 +67,11 @@ For `object_store` the same process is done in the `object_store` directory. Exa
 ```bash
 git checkout master
 git pull
-git checkout -b make-release
+git checkout -b <RELEASE_BRANCH>
+
+# Update versions. Make sure to run it before the next step since we do not want CHANGELOG-old.md affected.
+sed -i '' -e 's/14.0.0/24.0.0/g' `find . -name 'Cargo.toml' -or -name '*.md' | grep -v CHANGELOG.md`
+git commit -a -m 'Update version'
 
 # Copy the content of CHANGELOG.md to the beginning of CHANGELOG-old.md
 
@@ -87,9 +91,16 @@ python dev/release/label_issues.py
 git commit -a -m 'Create changelog'
 
 
-# update versions
-sed -i '' -e 's/14.0.0/24.0.0/g' `find . -name 'Cargo.toml' -or -name '*.md' | grep -v CHANGELOG.md`
-git commit -a -m 'Update version'
+# Manully edit ./dev/release/update_change_log.sh to reflect the release version
+# Create the changelog
+CHANGELOG_GITHUB_TOKEN=<TOKEN> ./dev/release/update_change_log.sh
+# Review change log / edit issues and labels if needed, rerun
+git commit -a -m 'Create changelog'
+
+git push
+
+# File the release PR
+export BRANCH=<RELEASE_BRANCH> && export GITHUB_USERNAME=<USERNAME> && export GITHUB_TOKEN=<TOKEN> && ./file_release_pr.sh
 ```
 
 Note that when reviewing the change log, rather than editing the
diff --git a/dev/release/file_release_pr.sh b/dev/release/file_release_pr.sh
new file mode 100644
index 000000000..71c7547cd
--- /dev/null
+++ b/dev/release/file_release_pr.sh
@@ -0,0 +1,40 @@
+#!/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.
+#
+# generates a standard release PR like this:
+# https://github.com/apache/arrow-rs/pull/2734
+#
+# Usage:
+# export BRANCH=<RELEASE_BRANCH> && export GITHUB_USERNAME=<USERNAME> && export GITHUB_TOKEN=<TOKEN> && ./file_release_pr.sh
+
+set -e
+
+FUTURE_RELEASE="23.0.0"
+ISSUE_NUMBER=2665
+
+TITLE="Update version to \`$FUTURE_RELEASE\` and update \`CHANGELOG\`"
+BODY="# Which issue does this PR close?\n\nCloses #$ISSUE_NUMBER.\n\n# Rationale for this change\nPrepare for biweekly release\n\n# What changes are included in this PR?\n\n# Are there any user-facing changes?\nYes"
+DATA="{\"title\":\"$TITLE\", \"body\":\"$BODY\", \"head\":\"$GITHUB_USERNAME:$BRANCH\",\"base\":\"master\"}"
+
+# Create the pull request
+curl -X POST \
+    -H "Accept: application/vnd.github+json" \
+    -H "Authorization: Bearer $GITHUB_TOKEN" \
+    https://api.github.com/repos/apache/arrow-rs/pulls \
+    -d "$DATA"