This repository has been archived by the owner on May 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Ticket29294 #332
Open
juga0
wants to merge
10
commits into
torproject:master
Choose a base branch
from
juga0:ticket29294
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ticket29294 #332
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
52b8404
new: Add gitchangelog configuration file
juga0 269c99b
new: Add gitchangelog template
juga0 2a7e672
new: Convert changelog to rst
juga0 0f7fc57
new: scripts: Add script to help new releases.
juga0 5046e2f
new: docs: Include script on how to release
juga0 e54f087
fixup! new: Convert changelog to rst
juga0 d7a17c3
fixup! new: Add gitchangelog configuration file
juga0 3c329a2
fixup! new: scripts: Add script to help new releases.
juga0 6d3879c
fixup! fixup! new: scripts: Add script to help new releases.
juga0 c1d0263
fixup! fixup! new: scripts: Add script to help new releases.
juga0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,12 +132,36 @@ def main(args): | |
# While we use Github releases and not dist.tpo | ||
print("\n6. Create release tarball") | ||
print("-------------------------") | ||
|
||
print("\nCreating a release tarball...") | ||
subprocess.call( | ||
"git archive --format=tar.gz --prefix=sbws-{}/ " | ||
"-o v{}.tar.gz v{}" | ||
.format(release_version, release_version, release_version).split(' ') | ||
) | ||
print("\nCreating tarball hash file...") | ||
fd = open('v{}.tar.gz.sha256'.format(release_version), 'w') | ||
subprocess.call("sha256sum v{}.tar.gz".format(release_version).split(' '), | ||
stdout=fd) | ||
fd.close() | ||
|
||
print("Obtaining Github tarball...") | ||
# This will overwrite local tarball, but that's fine since the hash file | ||
# won't be overwritten. | ||
subprocess.call( | ||
"torsocks wget https://github.com/torproject/sbws/archive/v{}.tar.gz" | ||
.format(release_version).split(' ') | ||
"wget https://github.com/torproject/sbws/archive/v{}.tar.gz " | ||
"-O v{}.tar.gz" | ||
.format(release_version, release_version).split(' ') | ||
) | ||
|
||
print("Verifying Github tarball and local one are the same...") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand why we do a sha256 check, rather than a file diff check. Are tarballs reproducible? |
||
try: | ||
subprocess.check_call("sha256sum -c v{}.tar.gz.sha256" | ||
.format(release_version).split(' ')) | ||
except subprocess.CalledProcessError: | ||
print("Tarballs are not the same") | ||
sys.exit(1) | ||
|
||
print("\n7. Create the tarball signature") | ||
print("-------------------------------") | ||
print("Creating detached signature...") | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overwriting the local tarball is only fine if the user reads the output of the script, and notices when the GitHub tarball is different. Please put the tarballs in separate files.