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
11 changes: 8 additions & 3 deletions dev/create-release/do-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# limitations under the License.
#

set -e

SELF=$(cd $(dirname $0) && pwd)
. "$SELF/release-util.sh"

Expand Down Expand Up @@ -52,9 +54,6 @@ function should_build {
if should_build "tag" && [ $SKIP_TAG = 0 ]; then
run_silent "Creating release tag $RELEASE_TAG..." "tag.log" \
"$SELF/release-tag.sh"
echo "It may take some time for the tag to be synchronized to github."
echo "Press enter when you've verified that the new tag ($RELEASE_TAG) is available."
read
else
echo "Skipping tag creation for $RELEASE_TAG."
fi
Expand All @@ -79,3 +78,9 @@ if should_build "publish"; then
else
echo "Skipping publish step."
fi

if should_build "tag" && [ $SKIP_TAG = 0 ]; then
# Push the tag after success
git push origin "$RELEASE_TAG"
git push origin "HEAD:$GIT_BRANCH"
fi
7 changes: 5 additions & 2 deletions dev/create-release/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,12 @@ BASE_DIR=$(pwd)
init_java
init_maven_sbt

rm -rf spark
git clone "$ASF_REPO"
# Only clone the repo fresh when not present, otherwise use checkout
if [ ! -d spark ]; then
git clone "$ASF_REPO"
fi
cd spark
git fetch
git checkout $GIT_REF
git_hash=`git rev-parse --short HEAD`
echo "Checked out Spark git hash $git_hash"
Expand Down
11 changes: 2 additions & 9 deletions dev/create-release/release-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function exit_with_usage {
local NAME=$(basename $0)
cat << EOF
usage: $NAME
Tags a Spark release on a particular branch.
Tags a Spark release on a particular branch. Must push after
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncompleted sentence Must push after ...?


Inputs are specified with the following environment variables:
ASF_USERNAME - Apache Username
Expand Down Expand Up @@ -101,14 +101,7 @@ sed -i".tmp7" 's/SPARK_VERSION_SHORT:.*$/SPARK_VERSION_SHORT: '"$R_NEXT_VERSION"

git commit -a -m "Preparing development version $NEXT_VERSION"

if ! is_dry_run; then
# Push changes
git push origin $RELEASE_TAG
git push origin HEAD:$GIT_BRANCH

cd ..
rm -rf spark
else
if is_dry_run; then
cd ..
mv spark spark.tag
echo "Clone with version changes and tag available as spark.tag in the output directory."
Expand Down