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

fix: pin Keygen integration to API v1.0 #6909

Merged

Conversation

ezekg
Copy link
Contributor

@ezekg ezekg commented May 31, 2022

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:

  1. The Release object's has-one Artifact relationship has been replaced with a has-many Artifacts relationship. The endpoint for the has-one Artifact relationship has been deprecated, i.e. PUT /releases/<release>/artifact.
  2. A status attribute has been to the Release object, which can be DRAFT or PUBLISHED. New Release objects will default to a draft state and must be explicitly published before being made available for upgrades.
  3. The following attributes have been moved from the Release object to the Artifact object: filename, filetype, filesize, platform, signature, and checksum.
  4. The endpoint for upserting a Release, i.e. 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.

@changeset-bot
Copy link

changeset-bot bot commented May 31, 2022

🦋 Changeset detected

Latest commit: 5e9ccd0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
app-builder-lib Patch
electron-updater Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented May 31, 2022

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit 5e9ccd0
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/6298c9f995e9c300096a8550
😎 Deploy Preview https://deploy-preview-6909--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ezekg ezekg changed the title Lock Keygen integration to API v1.0 feat: lock Keygen integration to API v1.0 May 31, 2022
@mmaietta
Copy link
Collaborator

mmaietta commented Jun 1, 2022

@ezekg thanks for the PR! Can you also add a changeset file for this via pnpm generate-changeset? That way it gets pulled by the release automation.

@ezekg ezekg changed the title feat: lock Keygen integration to API v1.0 feat: pin Keygen integration to API v1.0 Jun 2, 2022
@ezekg ezekg force-pushed the feature/lock-keygen-api-version branch from d06b072 to a033aa2 Compare June 2, 2022 14:28
@ezekg
Copy link
Contributor Author

ezekg commented Jun 2, 2022

@mmaietta done!

@ezekg ezekg changed the title feat: pin Keygen integration to API v1.0 fix: pin Keygen integration to API v1.0 Jun 2, 2022
@ezekg ezekg force-pushed the feature/lock-keygen-api-version branch from a033aa2 to 5e9ccd0 Compare June 2, 2022 14:32
@mmaietta mmaietta merged commit 0b6db59 into electron-userland:master Jun 3, 2022
@github-actions github-actions bot mentioned this pull request Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants