电子更新器 - 数字海洋空间

发布于 2025-01-27 09:21:19 字数 463 浏览 3 评论 0原文

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()
    }
}

我正在尝试为我的电子应用进行更新,我想使用数字海洋空间。任何人都可以帮助我将上述代码格式化为数字海洋空间格式。在Electron Updater文档中,没有有关如何连接数字海洋的具体指南。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

勿挽旧人 2025-02-03 09:21:19

看看此github存储库
“ build” package.json中的部分中

"publish": {
    "provider": "spaces",
    "name": "xxxxxxxxxx",
    "region": "nyc3",
    "acl": "public-read"
}

。部分:

"files": [
    "!electron-builder.env"
]

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"
]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文