Merge pull request #10614 from electron/upload-overwrite
Document how to fix a published release
This commit is contained in:
commit
494000114c
2 changed files with 50 additions and 11 deletions
|
@ -201,7 +201,7 @@ git push origin :release # delete remote branch
|
|||
[this bump commit]: https://github.com/electron/electron/commit/78ec1b8f89b3886b856377a1756a51617bc33f5a
|
||||
[electron-versioning]: /docs/tutorial/electron-versioning.md
|
||||
|
||||
## Promoting a release on npm
|
||||
## Promote a release on npm
|
||||
|
||||
New releases are published to npm with the `beta` tag. Every release should
|
||||
eventually get promoted to stable unless there's a good reason not to.
|
||||
|
@ -231,3 +231,34 @@ Then edit the release on GitGub:
|
|||
1. Remove `beta` from the release name: electron v1.7.5 ~~beta~~
|
||||
1. Uncheck the `prerelease` checkbox.
|
||||
1. Click "Update release"
|
||||
|
||||
## Fix missing binaries of a release manually
|
||||
|
||||
In the case of a corrupted release with broken CI machines, we might have to
|
||||
re-upload the binaries for an already published release.
|
||||
|
||||
The first step is to go to the
|
||||
[Releases](https://github.com/electron/electron/releases) page and delete the
|
||||
corrupted binaries with the `SHASUMS256.txt` checksum file.
|
||||
|
||||
Then manually create distributions for each platform and upload them:
|
||||
|
||||
```sh
|
||||
# Checkout the version to re-upload.
|
||||
git checkout vTHE.RELEASE.VERSION
|
||||
|
||||
# Do release build, specifying one target architecture.
|
||||
./script/bootstrap.py --target_arch [arm|x64|ia32]
|
||||
./script/build.py -c R
|
||||
./script/create-dist.py
|
||||
|
||||
# Explicitly allow overwritting a published release.
|
||||
./script/upload.py --overwrite
|
||||
```
|
||||
|
||||
After re-uploading all distributions, publish again to upload the checksum
|
||||
file:
|
||||
|
||||
```sh
|
||||
npm run release
|
||||
```
|
|
@ -51,11 +51,16 @@ def main():
|
|||
github = GitHub(auth_token())
|
||||
releases = github.repos(ELECTRON_REPO).releases.get()
|
||||
tag_exists = False
|
||||
for release in releases:
|
||||
if not release['draft'] and release['tag_name'] == args.version:
|
||||
for r in releases:
|
||||
if not r['draft'] and r['tag_name'] == args.version:
|
||||
release = r
|
||||
tag_exists = True
|
||||
break
|
||||
|
||||
assert tag_exists == args.overwrite, \
|
||||
'You have to pass --overwrite to overwrite a published release'
|
||||
|
||||
if not args.overwrite:
|
||||
release = create_or_get_release_draft(github, releases, args.version,
|
||||
tag_exists)
|
||||
|
||||
|
@ -112,6 +117,9 @@ def parse_args():
|
|||
parser = argparse.ArgumentParser(description='upload distribution file')
|
||||
parser.add_argument('-v', '--version', help='Specify the version',
|
||||
default=ELECTRON_VERSION)
|
||||
parser.add_argument('-o', '--overwrite',
|
||||
help='Overwrite a published release',
|
||||
action='store_true')
|
||||
parser.add_argument('-p', '--publish-release',
|
||||
help='Publish the release',
|
||||
action='store_true')
|
||||
|
|
Loading…
Reference in a new issue