首页 > 解决方案 > 是什么原因阻止 GitHub 将“标签”变成“发布”

问题描述

我管理一个电子应用程序,并已成功使用electron-squirrel-startupupdate.electronjs.org和我的公共 GitHub 存储库进行自动更新。我需要将我的应用程序打包从electron-installer-windows更新为electron-winstaller

打包到安装程序中非常棒,解决了我在使用电子安装程序窗口时遇到的问题,但是自动更新出现了问题。我希望我的应用程序从3.8.17更新到3.8.20。问题可能出在我对这个链中的一个步骤的配置/部署中,但我的调试能力已经到了尽头。

简而言之:

  1. 寻找新版本的调用继续返回当前版本信息......因为......
  2. GitHub 不会将“标签”变成“发布”

问题: 还有其他人遇到这种情况吗?关于如何进一步调试的任何想法?

细节:

GitHub我有一个标记版本,带有.exe.nupkg文件RELEASES。它被标记为最新版本,在“标签”中可见,但在“发布”中实际上不可见。关于我的文件的某些内容并没有触发 GitHub 将其实际设置为“发布”。

将 nupgk 信息 (.zip > unzip > dan_client.nuspec) 与 from 进行比较electron-installer-windows,格式相同,并且已使用 cmd 验证了 sha1 校验和:certutil -hashfile <filename> sha1 对于 RELEASES 文件也是如此。

main.js 标准代码在这里。update-electron-app按预期调用。

require('update-electron-app')({
    repo: `${owner}/${repo}`,
    logger: require('electron-log'),
    notifyUser: false
  })

Squirrel-CheckForUpdate.log 调用update.electron.js按预期发送:

[09/11/21 22:58:57] info: Program: Starting Squirrel Updater: --checkForUpdate https://update.electronjs.org/DentalAudioNotes/dan-client-builds/win32-x64/3.8.17
[09/11/21 22:58:57] info: Program: Fetching update information, downloading from https://update.electronjs.org/DentalAudioNotes/dan-client-builds/win32-x64/3.8.17
[09/11/21 22:58:57] info: CheckForUpdateImpl: Using existing staging user ID: a3883120-9694-5b86-8981-1b1015c25a13
[09/11/21 22:58:57] info: CheckForUpdateImpl: Downloading RELEASES file from https://update.electronjs.org/DentalAudioNotes/dan-client-builds/win32-x64/3.8.17
[09/11/21 22:58:57] info: FileDownloader: Downloading url: https://update.electronjs.org/DentalAudioNotes/dan-client-builds/win32-x64/3.8.17/RELEASES?id=dan_client&localVersion=3.8.17&arch=amd64
[09/11/21 22:58:58] info: Program: Finished Squirrel Updater

通过将 url 插入浏览器来测试响应:

.../win32-x64/3.8.17链接)=>Status Code: 204 No Content

.../win32-x64/3.8.17/RELEASES?id=dan_client&localVersion=3.8.17&arch=amd64(链接) =>995ECDBC10F717E0704F5B774533EA2977C725C1 https://github.com/DentalAudioNotes/dan-client-builds/releases/download/v3.8.17/dan_client-3.8.17-full.nupkg 85360877 即此调用未获取最新版本。

如果我使用旧版本号(例如 1.0.0)进行相同的调用,我会得到很好的响应,但仍然指的是 3.8.17:

.../win32-x64/1.0.0链接)=>

{
  "name":"v3.8.17",
  "notes":"...",
  "url":"https://github.com/DentalAudioNotes/dan-client-builds/releases/download/v3.8.17/dan_client-setup-3.8.17-live.exe"
}

标签: windowsgithubelectronnuget

解决方案


推荐阅读