Commit 58f71fab authored by juga's avatar juga
Browse files

fix: scripts: Change Github by Gitlab

releases can live now in gitlab.tpo, instead of and
there is no need to check them since Gitlab is FLOSS and gitlab.tpo is
hosted by Tor Project.

Also, stop assuming which is the current branch and remote and do not
push. Instead guide the maintainer to do it.
parent 6d39f0f2
......@@ -13,7 +13,7 @@ It will:
commit it and commit changelog
4. Create a version with the tag and sign it
5. Push the commit and tag to the repository
6. Obtain the release tarball from Github
6. Obtain the release tarball
7. Sign the release tarball
8. Modify the program to the next prerelease version and commit it
9. Push the commit
......@@ -23,10 +23,8 @@ All in sequence and doesn't recover from any previous step.
It assumes that:
- the program version is in ````
- gitchangelog and semantic_version are installed
- we are in the master branch
- the remote repository to push is origin
- the next prerelease version is the release version + "-dev0"
- the official releases tarballs are in Github (because no access to dist.tpo)
- the official tarball releases are at
- the key to sign the release is only one and is available in the system
......@@ -130,45 +128,22 @@ def main(args):
'-m', '"Release version {}."'.format(release_version)])
print("\n5. Push commit and tag")
print("\nPush now so that the Github tarball will have the"
" correct tag...")
input("Press enter when you are sure everything is correct.")['git', 'push', 'origin', 'master'])
# While we use Github releases and not dist.tpo
print("\n6. Create release tarball")
print("\nCreating a release tarball...")
"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')"sha256sum v{}.tar.gz".format(release_version).split(' '),
print("Obtaining Github tarball...")
# This will overwrite local tarball, but that's fine since the hash file
# won't be overwritten.
print("\nPush now so that the Gitlab creates the tarball from the new "
" commit and tag, eg:")
print("git push myremote mybranch")
print("git push myremote --tags")
input("Press enter when you are done.")
print("\n6. Obtain the release tarball")
print("Obtaining Gitlab tarball...")
"wget{}.tar.gz "
"wget{}/sbws-v{}.tar.gz "
"-O v{}.tar.gz"
.format(release_version, release_version).split(' ')
.format(release_version, release_version, release_version).split(' ')
print("Verifying Github tarball and local one are the same...")
subprocess.check_call("sha256sum -c v{}.tar.gz.sha256"
.format(release_version).split(' '))
except subprocess.CalledProcessError:
print("Tarballs are not the same")
print("\n7. Create the tarball signature")
print("Creating detached signature...")
......@@ -178,7 +153,7 @@ def main(args):
.format(keyid, release_version, release_version)
.split(' '))
print("\nUpload the signature manually to Github.")
print("\nUpload the signature manually to Gitlab.")
input("Press enter when done.")
print("\nRelease done!!!.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment