Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xuke committed Nov 14, 2017
1 parent 8f7f1f0 commit a566833
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ pids
# OSX
.DS_Store

build
dist
node_modules
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,41 @@
# electron-auto-updater-dome

macOS平台需要用开发者账号签名, 本dome未签名. mac下不能自动更新.


1. 默认的远程更新仓库信息会从 `.git/config` 中获取,如果要修改的化可以修改`package.json`

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

2. 创建一个[GitHub access token](https://github.com/settings/tokens/new), 至少勾选 `repo`权限, 然后导出环境变量(on macOS/linux):

export GH_TOKEN="<YOUR_TOKEN_HERE>"

3. 把当前版本的代码`push`到仓库, 然后打包并把release包推到github release中。本例中的

publish: build --mac --win --ia32 -p always

4. 现在[github·release](https://github.com/iffy/electron-updater-example/releases)中已经存在刚release的`draft`, 编辑后点击`Publish release`发布.

5. 更新`package.json`中的version, 重复第`3` & `4`步, `push`. publish最新版本到github

6. 打开低版本, 即开始升级



## 参考资料
[auto-updater](https://www.electron.build/auto-update)

[`publish`](https://github.com/electron-userland/electron-builder/wiki/Publishing-Artifacts#PublishConfiguration)

[electron-updater-example](https://github.com/iffy/electron-updater-example)
Binary file added build/icon.icns
Binary file not shown.
Binary file added build/icon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-auto-updater-dome",
"version": "1.0.0",
"version": "1.1.0",
"author": "WillCoco",
"description": "electron auto-updater dome",
"scripts": {
Expand Down Expand Up @@ -34,7 +34,7 @@
{
"provider": "github",
"owner": "WillCoco",
"repo": "clean"
"repo": "electron-auto-updater-demo"
}
],
"appId": "1234124",
Expand Down

0 comments on commit a566833

Please sign in to comment.