megahertz / electron-simple-publisher

Simple way to publish releases for electron-simple-updater
MIT License
67 stars 25 forks source link

update.json not created with github #43

Closed retaildesk closed 3 years ago

retaildesk commented 4 years ago

Hello,

First of all; maybe i'm doing something wrong.

But when i run node_modules/.bin/publish or node_modules/.bin/publish publish linux. The update.json is not created. It's creating a dir named uploads and uploads and it creates for example "darwin-x64-prod.json". My app is now for linux only, it is an appImage.

I tried in package.json the following: "updater": { "url": "updates/update.json" },

and in publisher.json "metaFileUrl": "updates/update.json",

And i also tried all kinds of variations for example -> https://raw.githubusercontent.com/usernane/reponame/master/update.json -> updates/update.json -> /updates/update.json

But it never created the update.json file. Only the build files in /updates.

Thanks for the help

megahertz commented 4 years ago

Hi, first of all, updater.url in package.json should be the full url of the remote file. The package doesn't create a local updates.json. It changes the file on github instead.

amjg-omny commented 4 years ago

Hi, I have the same problem even though I specified the updater.url with the correct url : "https://raw.githubusercontent.com/username/reponame/updates.json", I also created the updates.json file but it is not updated.

I tried following what you did in your electron-simple-updater example and set updatesJsonPath to "updates.json" but same thing, it doesn't edit it.

I checked in the code and I see no mention of this key (updatesJsonPath) nor anything where it concatenates a "global" updates.json file.

Thanks for the help :)

megahertz commented 4 years ago

@amjg-omny updatesJsonPath was replaced by metaFilePath, I've forgotten to replace the value in the sample. Will update the sample soon. But when your updates.json is in the project root, you don't need to specify the value.

So, a release was successfully published, but updates.json is still unchanged?

amjg-omny commented 4 years ago

@megahertz Ok, thank you. But yes, the release was published, the file updates/{platform}-{arch}-{channel}.json was properly created but updates.json was not updated. Even when I set verbose to true, I don't see any mention of the updates.json file in the github requests.

I tried setting metaFilePath to updates.json. When I publish the linux version it correctly updates the file but when I publish the windows version it overweites it completely and removes the linux part.

megahertz commented 4 years ago

@amjg-omny It seems that different configuration parts point to different json files. In the lates version, default metaFilePath is 'updates/{platform}-{arch}-{channel}.json', so in this situation updater.url should be like https://raw.githubusercontent.com/user/example/master/updates/{platform}-{arch}-{channel}.json. If you prefer to have single updates.json file, it should be set both for updater.url and for metaFilePath, check the file for details.

megahertz commented 3 years ago

Please let me know if it's still not solved