|
21 | 21 | set -u
|
22 | 22 |
|
23 | 23 | SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 24 | +SOURCE_TOP_DIR="${SOURCE_DIR}/../.." |
24 | 25 |
|
25 | 26 | if [ "$#" -ne 2 ]; then
|
26 | 27 | echo "Usage: $0 <previous-version> <version>"
|
|
30 | 31 | previous_version=$1
|
31 | 32 | version=$2
|
32 | 33 |
|
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" |
34 | 41 | release_dir="${site_dir}/_release"
|
35 | 42 | announce_file="${release_dir}/${version}.md"
|
36 | 43 | versions_yml="${site_dir}/_data/versions.yml"
|
@@ -133,6 +140,7 @@ cat <<ANNOUNCE >> "${announce_file}"
|
133 | 140 | [5]: https://bintray.com/apache/arrow/ubuntu/${version}/
|
134 | 141 | [6]: https://github.com/apache/arrow/releases/tag/apache-arrow-${version}
|
135 | 142 | ANNOUNCE
|
| 143 | +git add "${announce_file}" |
136 | 144 |
|
137 | 145 |
|
138 | 146 | # Update index
|
@@ -187,6 +195,8 @@ for md_file in ${announce_files}; do
|
187 | 195 | echo "[${i}]: {{ site.baseurl }}/release/${html_file}" >> ${index_file}
|
188 | 196 | done
|
189 | 197 |
|
| 198 | +git add ${index_file} |
| 199 | + |
190 | 200 | popd
|
191 | 201 |
|
192 | 202 |
|
@@ -226,3 +236,18 @@ current:
|
226 | 236 | sha256: 'https://www.apache.org/dist/arrow/arrow-${version}/apache-arrow-${version}.tar.gz.sha256'
|
227 | 237 | sha512: 'https://www.apache.org/dist/arrow/arrow-${version}/apache-arrow-${version}.tar.gz.sha512'
|
228 | 238 | 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