Skip to content

Commit

Permalink
Add help for adjusting package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
iffy committed Feb 14, 2017
1 parent 2bdec6c commit 0479b13
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,41 @@ This repo contains the **bare minimum code** to have an auto-updating Electron a

Install Xcode (from the App Store), then follow [these instructions](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW6) to make sure you have a "Mac Developer" certificate. If you'd like to export the certificate (for automated building, for instance) [you can](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW7). You would then follow [these instructions](https://github.com/electron-userland/electron-builder/wiki/Code-Signing).

2. First, install necessary dependencies with:
2. Adjust `package.json` if needed.

By default, `electron-updater` will try to detect the GitHub settings (such as the repo name and owner) from reading the `.git/config` or from reading other attributes within `package.json`. If the auto-detected settings are not what you want, configure the [`publish`](https://github.com/electron-userland/electron-builder/wiki/Publishing-Artifacts#PublishConfiguration) property as follows:

{
...
"build": {
"publish": [{
"provider": "github",
"owner": "iffy",
"repo": "electron-updater-example"
}],
...
}
}

3. First, install necessary dependencies with:

npm install

3. Generate a GitHub access token by going to <https://github.com/settings/tokens/new>. The access token should have the `repo` scope/permission. Once you have the token, assign it to an environment variable (on macOS/linux):
4. Generate a GitHub access token by going to <https://github.com/settings/tokens/new>. The access token should have the `repo` scope/permission. Once you have the token, assign it to an environment variable (on macOS/linux):

export GH_TOKEN="<YOUR_TOKEN_HERE>"

4. Publish with the `publish.sh` script:
5. Publish with the `publish.sh` script:

./publish.sh

5. Release the release on GitHub by going to <https://github.com/iffy/electron-updater-example/releases>, editing the release and clicking "Publish release."
6. Release the release on GitHub by going to <https://github.com/iffy/electron-updater-example/releases>, editing the release and clicking "Publish release."

7. Download and install the app from <https://github.com/iffy/electron-updater-example/releases>.

6. Download and install the app from <https://github.com/iffy/electron-updater-example/releases>.
8. Update the version in `package.json`, commit and push to GitHub.

7. Update the version in `package.json`, commit and push to GitHub.
9. Do steps 5 and 6 again.

8. Do steps 4 and 5 again.
10. Open the installed version of the app and see that it updates itself.

9. Open the installed version of the app and see that it updates itself.

0 comments on commit 0479b13

Please sign in to comment.