Skip to content

Apache DataFusion SQL Query Engine

ARROW-6797: [Release] Use a separately cloned arrow-site repository in the website post release script

Krisztián Szűcs388e8ef6d3a8
diff --git a/dev/release/changelog.py b/dev/release/changelog.py
index 4b6c4bc103..8091788124 100755
--- a/dev/release/changelog.py
+++ b/dev/release/changelog.py
@@ -33,9 +33,9 @@ import sys
import jira.client
# ASF JIRA username
-JIRA_USERNAME = os.environ.get("JIRA_USERNAME")
+JIRA_USERNAME = os.environ["APACHE_JIRA_USERNAME"]
# ASF JIRA password
-JIRA_PASSWORD = os.environ.get("JIRA_PASSWORD")
+JIRA_PASSWORD = os.environ["APACHE_JIRA_PASSWORD"]
JIRA_API_BASE = "https://issues.apache.org/jira"
diff --git a/dev/release/post-03-website.sh b/dev/release/post-03-website.sh
index db1374f4fe..b385866d0d 100755
--- a/dev/release/post-03-website.sh
+++ b/dev/release/post-03-website.sh
@@ -21,7 +21,8 @@ set -e
set -u
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-SOURCE_TOP_DIR="${SOURCE_DIR}/../.."
+ARROW_DIR="${SOURCE_DIR}/../.."
+ARROW_SITE_DIR="${SOURCE_DIR}/../../../arrow-site"
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <previous-version> <version>"
@@ -31,20 +32,19 @@ fi
previous_version=$1
version=$2
-pushd "${SOURCE_TOP_DIR}"
-
branch_name=release-note-${version}
+release_dir="${ARROW_SITE_DIR}/_release"
+announce_file="${release_dir}/${version}.md"
+versions_yml="${ARROW_SITE_DIR}/_data/versions.yml"
+
+pushd "${ARROW_SITE_DIR}"
git checkout master
git checkout -b ${branch_name}
+popd
-# NB: this assumes that you have arrow-site cloned in the (gitignored) site directory
-site_dir="${SOURCE_TOP_DIR}/site"
-release_dir="${site_dir}/_release"
-announce_file="${release_dir}/${version}.md"
-versions_yml="${site_dir}/_data/versions.yml"
+pushd "${ARROW_DIR}"
release_date=$(LANG=C date "+%-d %B %Y")
-
previous_tag_date=$(git log -n 1 --pretty=%aI apache-arrow-${previous_version})
rough_previous_release_date=$(date --date "${previous_tag_date}" +%s)
rough_release_date=$(date +%s)
@@ -54,12 +54,22 @@ rough_n_development_months=$((
git_tag=apache-arrow-${version}
git_range=apache-arrow-${previous_version}..${git_tag}
-n_commits=$(git log --pretty=oneline ${git_range} | wc -l)
+
+committers_command_line="git shortlog -csn ${git_range}"
contributors_command_line="git shortlog -sn ${git_range}"
+
+committers=$(${committers_command_line})
+contributors=$(${contributors_command_line})
+
+n_commits=$(git log --pretty=oneline ${git_range} | wc -l)
n_contributors=$(${contributors_command_line} | wc -l)
-committers_command_line="git shortlog -csn ${git_range}"
+
git_tag_hash=$(git log -n 1 --pretty=%H ${git_tag})
+popd
+
+pushd "${ARROW_SITE_DIR}"
+
# Add announce for the current version
cat <<ANNOUNCE > "${announce_file}"
---
@@ -108,7 +118,7 @@ This release includes ${n_commits} commits from ${n_contributors} distinct contr
$ ${contributors_command_line}
ANNOUNCE
-${contributors_command_line} >> "${announce_file}"
+echo "${contributors}" >> "${announce_file}"
cat <<ANNOUNCE >> "${announce_file}"
\`\`\`
@@ -121,7 +131,7 @@ The following Apache committers merged contributed patches to the repository.
$ ${committers_command_line}
ANNOUNCE
-${committers_command_line} >> "${announce_file}"
+echo "${committers}" >> "${announce_file}"
cat <<ANNOUNCE >> "${announce_file}"
\`\`\`
@@ -252,3 +262,5 @@ echo "1. Open a JIRA issue:"
echo " https://issues.apache.org/jira/projects/ARROW/issues/"
echo "2. Create a pull request:"
echo " ${github_url}/pull/new/${branch_name}"
+
+popd