Closed Zamiell closed 7 years ago
I need to upload that file to my GitHub releases page in order for automatic updating to work
It will be uploaded automatically. Local file is not created.
(JFYI: Also, app-update.yml
is not created, but will be created locally if app will be published).
So, please specify GH_TOKEN
env and your app will be uploaded automatically.
Isn't that a bug though?
What if I DON'T want electron-builder to automatically publish releases to GitHub? What if I want to: 1) manage the release process myself manually, or 2) use a separate automated solution?
In both of these use cases, it would be handy for electron-builder to place a latest.yml
in the dist
subfolder alongside the generated installer exe file.
Otherwise the user is forced to write a small Python script or something to manually generate the latest.yml
file, which is a little messy. Not to mention that the format of the latest.yml
file isn't included in the documentation at all, to my knowledge.
Isn't that a bug though?
Yes, it is bug. It the reason why issue was not closed. Should be addressed.
Ok, great. Thank you for your continued support develar. =)
Both files should be generated regardless of publish state. I spent 20 minutes to understand why my local test app cannot be updated due to missed app-update.yml
:)
@develar Any progress on this? I'd be happy to jump in and help debug this if you're not already elbow-deep into fixing it.
Fix requires deep understanding what electron-builder does and how. Some design decision should be made. In short: we cannot generate latest.yml for GitHub as file in the local fs for now due to special file escaping rules for Github releases. And I really don't want to introduce special folder in the dist for that, but I am going to try to avoid such escaping/transformation.
So, only I can fix this issue :(
Just to be clear, this issue effects generic
as well as github
release targets, correct?
No, only github
.
It's only github? I'm not seeing the latest.yml being generated for generic releases.
UPDATE: Never mind... worked this time. No idea what I messed up before... sheesh. Keep up the good work!
Solution "use product name everywhere and replace space to _" failed. Because GitHub doesn't allow unicode as well in the asset name.
githubArtifactName
is added to update info. So, the same file can be reused both for generic and GitHub providers.
Just add line on "package.json" "win": { "publish":[{"provider": "generic", "url": "your url (it could be localhost)"}] } and the "latest.yml" wil be generate
@Oscarato ... only if you really use generic provider and not Github. otherwise you must not do it because GitHub url is different.
exactly....
I cannot get app-update.yml to be generated at all. Nor latest.yml for that matter but app-update is what's causing my updates to error out. How exactly am I supposed to make these generate? I'm trying to run a build with "publish" set in my package.json like so:
"build": {
"appId": "com.my.app",
"win": {
"publish": {
"provider": "generic",
"url": "https://my.url"
},
"target": [
"squirrel"
]
}
...
}
I initially tried build -p never
since I need to deploy it manually, but when this didn't work, I tried build -p always
which still didn't work. I don't understand the need for this "publish" field, why can't I just configure it separately?
@obermillerk https://www.electron.build/auto-update
Simplified auto-update is supported on Windows if you use the default NSIS target, but is not supported for Squirrel.Windows.
@develar so electron-updater is not usable with squirrel at all?
@obermillerk Yes.
That is unfortunate... Also, the phrasing "Simplified auto-update" does not make it clear that the whole library is not usable with squirrel.
I assume it would be quite a chore adding support for squirrel? If it's something you've considered doing it would be greatly appreciated, as the built in autoUpdater is very limiting but I'm not sure that we would want to use NSIS.
Squirrel.Windows is limited and no plans to support it. NSIS is feature-rich, proven and widely used solution.
Gonna switch over to NSIS. Thanks for all your work on this project, it's phenomenal.
To make clear — Squirrel.Windows is limited in all aspects. User customizability, feature set, debugability. Not suitable for a lot of users. Our principle — do not reinvent the wheel. Nsis allows us to easily implement features/requests instead of writing yet another Windows installer tool. And a lot of users simply write own maintainable installer scripts without need to wait upstream.
I'm seeing this issue in Electron Builder starting with (I think) v19.47.x on Windows 7 x64.
I see a blockmap
file, but no longer a yml
.
I'm seeing this issue again with electron-builder@20.8.1
I haven't been able to build for a while, so I can't say with any level of precision where this began to occur again, but in version between 19.47.x
and now, it had been working properly. I'm using NSIS on Windows with Electron 1.8.4.
Thoughts?
Also seeing this issue in 22.14.5
https://github.com/mifi/lossless-cut/issues/621 https://github.com/mifi/lossless-cut/releases/tag/v3.39.0
Just add line on "package.json" "win": { "publish":[{"provider": "generic", "url": "your url (it could be localhost)"}] } and the "latest.yml" wil be generate
This helps me fix the issue. Correction, it's
"win": { "publish": { "provider": "generic", "url": "localhost"} }
Target: win32 x64
Build command:
npm run dist --python="C:/Python27/python.exe"
Console output:
Rebuilding native production dependencies for arch x64 Packaging for win32 x64 using electron 1.4.7 to dist\win-unpacked Packaging NSIS installer for arch x64 Building NSIS installer
{ "name": "RacingPlus", "description": "A racing mod for The Binding of Isaac: Afterbirth+.", "scripts": { "start": "electron ./app", "postinstall": "install-app-deps", "pack": "build --dir", "dist": "build", }, "build": { "appId": "org.electron.isaacRacingClient", "win": {}, "publish": { "provider": "github" } }, "repository": { "type": "git", "url": "git+https://github.com/Zamiell/isaac-racing-client.git" }, "license": "GPL-3.0", "bugs": { "url": "https://github.com/Zamiell/isaac-racing-client/issues" }, "homepage": "https://isaacracing.net", "devDependencies": { "electron": "^1.4.7", "electron-builder": "^8.6.0" } }
{ "name": "RacingPlus", "productName": "Racing+", "main": "./main.js", "version": "0.0.1", "description": "A racing mod for The Binding of Isaac: Afterbirth+.", "author": "Racing+", "license": "GPL-3.0", "dependencies": { "electron-auto-updater": "^0.5.3", "electron-is-dev": "^0.1.2", "fs-extra": "^1.0.0", "keytar": "^3.0.2", "tail": "^1.2.1", "teeny-conf": "^1.0.1" } }