Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dev/release/01-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ fi
if [ ${PREPARE_BRANCH} -gt 0 ]; then
if [[ $(git branch -l "${release_candidate_branch}") ]]; then
next_rc_number=$(($rc_number+1))
source "${SOURCE_DIR}/git-vars.sh"
echo "Branch ${release_candidate_branch} already exists, so create a new release candidate:"
echo "1. Checkout the master branch for major releases and maint-<version> for patch releases."
echo "1. Checkout the default branch for major releases and maint-<version> for patch releases."
echo "2. Execute the script again with bumped RC number."
echo "Commands:"
echo " git checkout master"
echo " git checkout ${DEFAULT_BRANCH}"
echo " dev/release/01-prepare.sh ${version} ${next_version} ${next_rc_number}"
exit 1
fi
Expand Down
18 changes: 18 additions & 0 deletions dev/release/git-vars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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.

DEFAULT_BRANCH="$(git rev-parse --abbrev-ref origin/HEAD | sed s@origin/@@)"
5 changes: 3 additions & 2 deletions dev/release/post-04-website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ announce_file="${release_dir}/${version}.md"
versions_yml="${ARROW_SITE_DIR}/_data/versions.yml"

pushd "${ARROW_SITE_DIR}"
source "${SOURCE_DIR}/git-vars.sh"
git fetch --all --prune --tags --force -j$(nproc)
git checkout master
git rebase apache/master
git checkout ${DEFAULT_BRANCH}
git rebase apache/${DEFAULT_BRANCH}
git branch -D ${branch_name} || :
git checkout -b ${branch_name}
popd
Expand Down
3 changes: 2 additions & 1 deletion dev/release/post-09-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ release_tag="apache-arrow-${version}"
branch_name=release-docs-${version}

pushd "${ARROW_SITE_DIR}"
source "${SOURCE_DIR}/git-vars.sh"
git fetch --all --prune --tags --force -j$(nproc)
git checkout .
git checkout master
git checkout ${DEFAULT_BRANCH}
git clean -d -f -x
git branch -D asf-site || :
git checkout -b asf-site origin/asf-site
Expand Down
17 changes: 9 additions & 8 deletions dev/release/post-12-bump-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
set -ue

SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "${SOURCE_DIR}/git-vars.sh"

if [ "$#" -ne 2 ]; then
echo "Usage: $0 <version> <next_version>"
exit 1
fi

: ${BUMP_DEFAULT:=1}
: ${BUMP_UPDATE_LOCAL_MASTER:=${BUMP_DEFAULT}}
: ${BUMP_UPDATE_LOCAL_DEFAULT_BRANCH:=${BUMP_DEFAULT}}
: ${BUMP_VERSION_POST_TAG:=${BUMP_DEFAULT}}
: ${BUMP_DEB_PACKAGE_NAMES:=${BUMP_DEFAULT}}
: ${BUMP_LINUX_PACKAGES:=${BUMP_DEFAULT}}
Expand All @@ -40,11 +41,11 @@ version=$1
next_version=$2
next_version_snapshot="${next_version}-SNAPSHOT"

if [ ${BUMP_UPDATE_LOCAL_MASTER} -gt 0 ]; then
echo "Updating local master"
if [ ${BUMP_UPDATE_LOCAL_DEFAULT_BRANCH} -gt 0 ]; then
echo "Updating local default branch"
git fetch --all --prune --tags --force -j$(nproc)
git checkout master
git rebase apache/master
git checkout ${DEFAULT_BRANCH}
git rebase apache/${DEFAULT_BRANCH}
fi

if [ ${BUMP_VERSION_POST_TAG} -gt 0 ]; then
Expand Down Expand Up @@ -102,13 +103,13 @@ if [ ${BUMP_LINUX_PACKAGES} -gt 0 ]; then
fi

if [ ${BUMP_PUSH} -gt 0 ]; then
echo "Pushing changes to the master in apache/arrow"
git push apache master
echo "Pushing changes to the default branch in apache/arrow"
git push apache ${DEFAULT_BRANCH}
fi

if [ ${BUMP_TAG} -gt 0 ]; then
dev_tag=apache-arrow-${next_version}.dev
echo "Tagging ${dev_tag}"
git tag ${dev_tag} master
git tag ${dev_tag} ${DEFAULT_BRANCH}
git push apache ${dev_tag}
fi