Skip to content

Commit

Permalink
Add file_release_pr.sh and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
chloeandmargaret committed Sep 15, 2022
1 parent 5238789 commit 57dd894
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 8 deletions.
19 changes: 11 additions & 8 deletions dev/release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,22 @@ 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>

# Copy the content of CHANGELOG.md to the beginning of CHANGELOG-old.md
# 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/22.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
# 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
# Review change log / edit issues and labels if needed, rerun
git commit -a -m 'Create changelog'

# update versions
sed -i '' -e 's/14.0.0/22.0.0/g' `find . -name 'Cargo.toml' -or -name '*.md' | grep -v CHANGELOG.md`
git commit -a -m 'Update version'
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
Expand Down
40 changes: 40 additions & 0 deletions dev/release/file_release_pr.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 57dd894

Please sign in to comment.