'Electron Updater - Digital Ocean Spaces
export default class AppUpdater {
constructor() {
const options = {
provider: 'generic',
url: 'https://example.com/auto-updates'
}
const autoUpdater = new NsisUpdater(options)
autoUpdater.addAuthHeader(`Bearer ${token}`)
autoUpdater.checkForUpdatesAndNotify()
}
}
I am trying to make an updater for my electron app and I want to use Digital Ocean Spaces. Can anybody help me to format the above code to Digital Ocean Spaces format. In Electron Updater docs there is not a specific guide for how to connect Digital Ocean.
Solution 1:[1]
Have a look at this GitHub repository:
In the "build" section in package.json you need
"publish": {
"provider": "spaces",
"name": "xxxxxxxxxx",
"region": "nyc3",
"acl": "public-read"
}
Put your DO_KEY_ID and DO_SECRET_KEY in electron-builder.env which you exclude via neagtive selector, again in the "build"section:
"files": [
"!electron-builder.env"
]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | cachius |
