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

Issue with Maker zip example when using releases on S3 #162

Open
stewartrutledge opened this issue Jan 21, 2024 · 1 comment
Open

Issue with Maker zip example when using releases on S3 #162

stewartrutledge opened this issue Jan 21, 2024 · 1 comment

Comments

@stewartrutledge
Copy link

On the page https://www.electronforge.io/config/publishers/s3 the documentation gives an example of a mac configuration:

...
    {
      name: '@electron-forge/maker-zip',
      config: (arch) => ({
        // Note that we must provide this S3 URL here
        // in order to support smooth version transitions
        // especially when using a CDN to front your updates
        macUpdateManifestBaseUrl: `https://my-bucket.s3.amazonaws.com/my-app-updates/darwin/${arch}/RELEASES.json`
      })
    },
...

After a bit of torubleshooting and digging through the code for the zip maker

I found

const parsed = new URL(this.config.macUpdateManifestBaseUrl);
parsed.pathname += '/RELEASES.json';

This results in a URL like: https://my-bucket.s3.amazonaws.com/my-app-updates/darwin/${arch}/RELEASES.json/RELEASES.json

So either:

  1. The documentation should be updated to remove the file name and only provide path
  2. The zip maker should check if the config ends with RELEASES.json and only append if it does.

I'm more than happy to provide a pull request if you can point me in the right direction :)

@stewartrutledge stewartrutledge changed the title Issue with S3 Published docs for mac Issue with Maker zip example when using releases on S3 Jan 21, 2024
@Ayush9026
Copy link

/assign i will solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants