Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specify release candidate number #1419

Merged
merged 2 commits into from
May 5, 2023
Merged
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: 7 additions & 4 deletions x.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,18 @@ def write_version(release_version: str) -> str:
return version


def package_source(release_version: str) -> None:
def package_source(release_version: str, release_candidate_number: Optional[int]) -> None:
# 0. Write input version to VERSION file
version = write_version(release_version)

# 1. Git commit and tag
git = find_command('git', msg='git is required for source packaging')
run(git, 'commit', '-a', '-m', f'[source-release] prepare release apache-kvrocks-{version}')
run(git, 'tag', '-a', f'v{version}', '-m', f'[source-release] copy for tag v{version}')


if release_candidate_number is None:
run(git, 'tag', '-a', f'v{version}', '-m', f'[source-release] copy for tag v{version}')
else:
run(git, 'tag', '-a', f'v{version}-rc{release_candidate_number}', '-m', f'[source-release] copy for tag v{version}-rc{release_candidate_number}')

# 2. Create the source tarball
folder = f'apache-kvrocks-{version}-incubating-src'
tarball = f'apache-kvrocks-{version}-incubating-src.tar.gz'
Expand Down Expand Up @@ -354,6 +356,7 @@ def test_go(dir: str, cli_path: str, rest: List[str]) -> None:
)
parser_package_source.add_argument('-v', '--release-version', required=True, metavar='VERSION',
help='current releasing version')
parser_package_source.add_argument('-rc', '--release-candidate-number',required=False, type=int, help='current releasing candidate number')
parser_package_source.set_defaults(func=package_source)

parser_test = subparsers.add_parser(
Expand Down