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

x.py: support source packaging #729

Merged
merged 1 commit into from
Jul 15, 2022
Merged

Conversation

tisonkun
Copy link
Member

@tisonkun tisonkun commented Jul 14, 2022

Try out with: ./x.py package source -v 2.1.0 in a staging branch.

@tisonkun tisonkun marked this pull request as ready for review July 14, 2022 10:08
f.write(version)

# 1. Git commit and tag
git = find_command('git', msg='git is required for source packaging')
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't push anything to remote here. The release manager should manually git push --tags to push the tag.

In my opinion the workflow should be:

  1. Checkout a staging branch - if we do lightweight release, it's possible to run on unstable branch.
  2. Run ./x.py package source to get the source tarball, .asc sign file, .sha512 checksum file.
  3. Copy those files to SVN (https://dist.apache.org/repos/dist/dev/incubator/kvrocks).
  4. Manually push tags (maybe we can have a -rcN tailer, but I don't make it too complex now.
  5. Calling a vote.


# 3. GPG Sign
gpg = find_command('gpg', msg='gpg is required for source packaging')
run([gpg, '--detach-sign', '--armor', tarball], stdout=subprocess.PIPE)
Copy link
Member Author

Choose a reason for hiding this comment

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

FYI - You can verify signature by gpg --verify ${tarball}.asc ${tarball}.

Comment on lines +158 to +162
sha512sum = find_command('sha512sum', msg='sha512sum is required for source packaging')
output = run([sha512sum, tarball], stdout=subprocess.PIPE)
payload = output.read().decode().strip()
with open(f'{tarball}.sha512', 'w+') as f:
f.write(payload)
Copy link
Member Author

Choose a reason for hiding this comment

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

FYI - You can verify checksum by sha512sum -c ${tarball}.sha512.

Signed-off-by: tison <wander4096@gmail.com>
@git-hulk
Copy link
Member

Thanks @tisonkun

@tisonkun
Copy link
Member Author

Thanks for your reviews.

Merging...

@tisonkun tisonkun merged commit 3e32ecc into apache:unstable Jul 15, 2022
@tisonkun tisonkun deleted the source-packaging branch July 15, 2022 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants