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

set electron-updater releaseNotes at build time #1511

Closed
bennol opened this issue Apr 28, 2017 · 13 comments · May be fixed by qcif/data-curator#563
Closed

set electron-updater releaseNotes at build time #1511

bennol opened this issue Apr 28, 2017 · 13 comments · May be fixed by qcif/data-curator#563

Comments

@bennol
Copy link
Contributor

bennol commented Apr 28, 2017

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",'

@bennol bennol changed the title set auto-updater releaseNotes at build time set electron-updater releaseNotes at build time Apr 28, 2017
@develar
Copy link
Member

develar commented Jun 17, 2017

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.

@develar develar closed this as completed Jun 17, 2017
@ir-fuel
Copy link

ir-fuel commented Jun 17, 2017

It seems this is related to my question here
#1690

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

@ir-fuel
Copy link

ir-fuel commented Jun 17, 2017

And how should that myReleaseNotes.yml file be structured?

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

Like this?

@develar
Copy link
Member

develar commented Jun 17, 2017

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

@ir-fuel
Copy link

ir-fuel commented Jun 21, 2017

Did I wait long enough? :)

@develar
Copy link
Member

develar commented Jun 21, 2017

19.7.0

Create release-notes.md in the build resources.

@bennol
Copy link
Contributor Author

bennol commented Jun 27, 2017

@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.

@develar
Copy link
Member

develar commented Jun 27, 2017

latest-mac.json

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

@bennol
Copy link
Contributor Author

bennol commented Jun 27, 2017

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

@ir-fuel
Copy link

ir-fuel commented Jul 1, 2017

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

@ir-fuel
Copy link

ir-fuel commented Jul 1, 2017

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

@shivamthakur98
Copy link

shivamthakur98 commented Dec 16, 2021

I don't understand how the above can be used to add release notes?
Can someone explain steps to do that

@lauer
Copy link

lauer commented Oct 11, 2022

@shivamthakur98 I don't know if you already found out, but for the record, my solution was

"build": {
    "releaseInfo": {
      "releaseNotesFile": "public/release-notes.md"
    },
}

And then place the release-notes.md in the public directory. It will then be embedded into latest.yml on build.

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

Successfully merging a pull request may close this issue.

5 participants