Electron-builder: set electron-updater releaseNotes at build time

Created on 28 Apr 2017  路  11Comments  路  Source: electron-userland/electron-builder

Feature request

Use case

Publishing an electron app through AWS S3 with release notes. (On S3 there is no online-interface for editing the latest-mac.json or latest.yml files.)
Currently working procedure:

  • Publish via build -nw --publish always
  • Download latest-mac.json andlatest.yml from S3
  • Insert release notes manually "releaseNotes":"Something", / releaseNotes: Something
  • Upload it back to S3 (updating permissions etc.)

It would be great to be able to specify the releaseNotes locally at build time. I could imagine the following procedures coming in handy:

Feature A

Being able to just build, then modify latest-mac.json andlatest.yml, then just publish (without rebuilding)

  • npm run dist that executes build -mw
  • Injecting releaseNotes manually by adding "releaseNotes":"Something", / releaseNotes: Something to json/yml
  • npm run release That only runs the publish step of electron-builder, pushing the artifacts and latest-files to s3 or other provider with something like build --publish-only

Feature B

Being able to specify releaseNotes in the package.json or with a command line option like build --releaseNotes "Something"
Considerations: Release notes are likely to be multi-lined markdown that have to be converted to different formats for yml and json (See example below).

# My shiny new version release notes
With some details
- Detail a
- Detail b

For latest.yml

releaseNotes: |
  # My shiny new version release notes
  With some details
  - Detail a
  - Detail b

String to be inserted has to be
'releaseNotes: |\n# My shiny new version release notes\nWith some details\n - Detail a\n - Detail b\n'


For latest-mac.json

"releaseNotes": "# My shiny new version release notes\nWith some details\n  - Detail a\n - Detail b",

String to be inserted has to be
'"releaseNotes": "# My shiny new version release notes\nWith some details\n - Detail a\n - Detail b",'

deployment feature

Most helpful comment

19.7.0

Create release-notes.md in the build resources.

All 11 comments

Sorry for late response.

Now you can:

  • use CLI -c arg to set config
  • -c.config.extends to file path to config (add fields under key publish).

For GitHub these fields computed automatically now.

It seems this is related to my question here
https://github.com/electron-userland/electron-builder/issues/1690

I don't understand how the above can be used to add release notes?

And how should that myReleaseNotes.yml file be structured?

releaseNotes: |
    This is a release notes file
    doc on several lines

Like this?

Wait a moment (or 10 hours), I will add docs and push some changes.

Did I wait long enough? :)

19.7.0

Create release-notes.md in the build resources.

@develar Thanks for your quick implementation!

With 19.7.0 on Mac building with release-notes.md works fine and notes are contained in the latest.yml.
The generated latest-mac.json however doesn't have the relaseNotes property. For some reason a latest-mac.yml is created that contains all the information.

latest-mac.json

This file generated only for old clients (electron-updater 1.x). electron-updater 2.x doesn't use this file.

@develar My bad - I forgot to update the electron-updater package. Thanks for the clarification!

If I just create release-notes.md in build shouldn't they be picked up automatically? Does not seem to be the case here.

Found it. Updating electron-builder to a version that actually supports it helps ....

Was this page helpful?
0 / 5 - 0 ratings