fix: pin Keygen integration to API v1.0 #6909
Merged
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.
As part of an upcoming change to Keygen's API, we need to pin electron-builder's integration to v1.0 of Keygen's API so that newer Keygen users on v1.1 (the soon-to-be new default) can still utilize the current integration as-is. I wanted to get this integration updated before we roll out the newer API version in the coming weeks.
Below is a list of notable things that will be changing in v1.1 of Keygen's API:
PUT /releases/<release>/artifact
.status
attribute has been to the Release object, which can beDRAFT
orPUBLISHED
. New Release objects will default to a draft state and must be explicitly published before being made available for upgrades.filename
,filetype
,filesize
,platform
,signature
, andchecksum
.PUT /releases
, has been deprecated.Essentially, the gist of the change set here is around refactoring Releases to be a versioned "bucket" for Artifacts, rather than a one-to-one relationship between a Release and Artifact. The new object model gets rid of a lot of confusing problems that the previous modeling had, such as conflicting versions when a filetype or filename matched a previous Release.
In v1.1 of Keygen's API, multiple Releases can have Artifacts that have the same filename, e.g.
latest-mac.yml
, and the latest will be retrieved when requesting a particular Artifact by filename, e.g.GET /artifacts/<filename>
.These API changes are being made in a backwards-compatible way, with the
Keygen-Version
header used to communicate which API version is requested. All existing electron-builder integrations will continue to work.I'm going to create a follow up PR that refactors the integration to use v1.1 of Keygen's API.