Skip to content

Commit

Permalink
HOTFIX: Updates on release.py before 1.0.0
Browse files Browse the repository at this point in the history
Author: Guozhang Wang <[email protected]>

Reviewers: Ismael Juma <[email protected]>, Ewen Cheslack-Postava <[email protected]>

Closes apache#4054 from guozhangwang/KMinor-pre-1.0-release
  • Loading branch information
guozhangwang committed Oct 11, 2017
1 parent c22c177 commit 54ed343
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,20 +204,20 @@ def get_pref(prefs, name, request_fn):
cmd("Verifying that you have no unstaged git changes", 'git diff --exit-code --quiet')
cmd("Verifying that you have no staged git changes", 'git diff --cached --exit-code --quiet')

release_version = raw_input("Release version (without any RC info, e.g. 0.10.2.0): ")
release_version = raw_input("Release version (without any RC info, e.g. 1.0.0): ")
try:
release_version_parts = release_version.split('.')
if len(release_version_parts) != 4:
fail("Invalid release version, should have 4 version number components")
if len(release_version_parts) != 3:
fail("Invalid release version, should have 3 version number components")
# Validate each part is a number
[int(x) for x in release_version_parts]
except ValueError:
fail("Invalid release version, should be a dotted version number")

rc = raw_input("Release candidate number: ")

dev_branch = '.'.join(release_version_parts[:3])
docs_version = ''.join(release_version_parts[:3])
dev_branch = '.'.join(release_version_parts[:2])
docs_version = ''.join(release_version_parts[:2])

# Validate that the release doesn't already exist and that the
cmd("Fetching tags from upstream", 'git fetch --tags %s' % PUSH_REMOTE_NAME)
Expand Down Expand Up @@ -340,7 +340,7 @@ def select_gpg_key():

cmd("Building artifacts", "gradle", cwd=kafka_dir, env=jdk7_env)
cmd("Building artifacts", "./gradlew clean releaseTarGzAll aggregatedJavadoc", cwd=kafka_dir, env=jdk7_env)
# This should be removed with KAFKA-4421
# we need extra cmd to build 2.12 with jdk8 specifically
cmd("Building artifacts for Scala 2.12", "./gradlew releaseTarGz -PscalaVersion=2.12", cwd=kafka_dir, env=jdk8_env)
cmd("Copying artifacts", "cp %s/core/build/distributions/* %s" % (kafka_dir, artifacts_dir), shell=True)
cmd("Copying artifacts", "cp -R %s/build/docs/javadoc %s" % (kafka_dir, artifacts_dir))
Expand Down Expand Up @@ -441,7 +441,7 @@ def select_gpg_key():
fail("Ok, giving up")
cmd("Pushing RC tag", "git push %s %s" % (PUSH_REMOTE_NAME, rc_tag))

# Move back to starting branch and clean out the temporary release branch (e.g. 0.10.2.0) we used to generate everything
# Move back to starting branch and clean out the temporary release branch (e.g. 1.0.0) we used to generate everything
cmd("Resetting repository working state", "git reset --hard HEAD && git checkout %s" % starting_branch, shell=True)
cmd("Deleting git branches %s" % release_version, "git branch -D %s" % release_version, shell=True)

Expand Down

0 comments on commit 54ed343

Please sign in to comment.