Skip to content

Commit 85f2fb1

Browse files
kouwesm
authored andcommitted
ARROW-5938: [Release] Create branch for adding release note automatically
Author: Sutou Kouhei <[email protected]> Closes apache#4869 from kou/release-post-website-create-release-note-branch and squashes the following commits: 9b14b32eb <Sutou Kouhei> Create branch for adding release note automatically
1 parent 2b16d7a commit 85f2fb1

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

dev/release/post-03-website.sh

+26-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ set -e
2121
set -u
2222

2323
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
24+
SOURCE_TOP_DIR="${SOURCE_DIR}/../.."
2425

2526
if [ "$#" -ne 2 ]; then
2627
echo "Usage: $0 <previous-version> <version>"
@@ -30,7 +31,13 @@ fi
3031
previous_version=$1
3132
version=$2
3233

33-
site_dir="${SOURCE_DIR}/../../site"
34+
pushd "${SOURCE_TOP_DIR}"
35+
36+
branch_name=release-note-${version}
37+
git checkout master
38+
git checkout -b ${branch_name}
39+
40+
site_dir="${SOURCE_TOP_DIR}/site"
3441
release_dir="${site_dir}/_release"
3542
announce_file="${release_dir}/${version}.md"
3643
versions_yml="${site_dir}/_data/versions.yml"
@@ -133,6 +140,7 @@ cat <<ANNOUNCE >> "${announce_file}"
133140
[5]: https://bintray.com/apache/arrow/ubuntu/${version}/
134141
[6]: https://github.com/apache/arrow/releases/tag/apache-arrow-${version}
135142
ANNOUNCE
143+
git add "${announce_file}"
136144

137145

138146
# Update index
@@ -187,6 +195,8 @@ for md_file in ${announce_files}; do
187195
echo "[${i}]: {{ site.baseurl }}/release/${html_file}" >> ${index_file}
188196
done
189197

198+
git add ${index_file}
199+
190200
popd
191201

192202

@@ -226,3 +236,18 @@ current:
226236
sha256: 'https://www.apache.org/dist/arrow/arrow-${version}/apache-arrow-${version}.tar.gz.sha256'
227237
sha512: 'https://www.apache.org/dist/arrow/arrow-${version}/apache-arrow-${version}.tar.gz.sha512'
228238
YAML
239+
git add "${versions_yml}"
240+
241+
git commit -m "[Website] Add release note for ${version}"
242+
git push -u origin ${branch_name}
243+
244+
github_url=$(git remote get-url origin | \
245+
sed \
246+
-e 's,^[email protected]:,https://github.com/,' \
247+
-e 's,\.git$,,')
248+
249+
echo "Success!"
250+
echo "1. Open a JIRA issue:"
251+
echo " https://issues.apache.org/jira/projects/ARROW/issues/"
252+
echo "2. Create a pull request:"
253+
echo " ${github_url}/pull/new/${branch_name}"

0 commit comments

Comments
 (0)