Electron-builder: latest-mac.json is not being created when publishing to Github

Created on 19 Feb 2017  Â·  13Comments  Â·  Source: electron-userland/electron-builder

  • Version:
    11.2
    1.7.1
  • Target:
    Windows
    Mac


Whenever publishing to Github, there is not latest-mac.json included in the release, but there is a latest.yml file being published. This is also exactly the same in my dist directory: There is a latest.yml, but no latest-mac.json. Why is it not there?

question

Most helpful comment

Why is it not produced just with a dmg? The latest-mac.json definitely needs to be created no matter what type of target you are using. This needs to be changed in my opinion.

All 13 comments

Version 11 is old. Latest is 13.9.0

Still doesn't work with the latest version.

@adamsiwiec have you changed the Mac build target setting from default?

I had specified DMG only in my Mac target and had the same problem of no latest-mac.json being created. After changing the Mac target back to the default (which produces zip and DMG) then latest-mac.json is generated.

latest-mac.json is produced only if zip in the target list. Default target for macOS is ["dmg", "zip"]

Why is it not produced just with a dmg? The latest-mac.json definitely needs to be created no matter what type of target you are using. This needs to be changed in my opinion.

@adamsiwiec @develar

I have the same problem with the latest-mac.json not being generated if publishing is disabled.

As i have my own deployment script, setting "build.publish = null" results in no json being generated, and thus auto-update not working.

As i have my own deployment script, setting "build.publish = null" results in no json being generated, and thus auto-update not working.

@sidneys In any case for auto-update you have to use at least generic provider configured.

@adamsiwiec Squirrel.Mac is used under the hood and, so, zip is required in addition to dmg.

@develar

When setting "generic" as a provider, the build process aborts due to missing configuration (url, etc.), which is not needed in the first place in environments with custom publishing/deployment processes which would nonetheless use the auto-updating feature.

Is generation of these auto-update json files tied to configuring a publisher? If so, this should be made separate, for example by providing an build.autoUpdate = true option in order to disentangle the publish and auto-update features.

@sidneys URL is required and will be used to generate update file — latest-Mac. What's wrong?

@develar

I now added a generic provider and url to the package.json build config, like this:

{
    "publish": {
        "provider": "generic",
        "url": "https://github.com/sidneys/${name}/releases/download/v${version}"
    }
}

However, the resulting latest-mac.json automatically appends some automatically generated artifact file name to the url:

{
  "version": "3.9.96",
  "releaseDate": "2017-03-15T19:55:25.356Z",
  "url": "https://github.com/sidneys/pb-for-desktop/releases/download/v3.9.96/PB%20for%20Desktop-3.9.96-mac.zip"
}

How can i change the appended file name?

Thanks for your response!

@sidneys GitHub cannot be used as generic server. Why our GitHub publisher is not suitable for you? Anyway — you are not forced to use it. Please disable publishing using CLI --publish=never and remove publish from config. GitHub provider will be detected automatically or set it explicitly.

@develar

Aren't the "latest" JSON and YML files required for auto update, apart from publishing?

@sidneys required and generated always regardless of publishing. Even if never.

Was this page helpful?
0 / 5 - 0 ratings