Closed SebRut closed 6 years ago
If I remember correctly @TimHacker already made some job in this area and he had different problems. Tim, it would be great if you could participate. Thank you.
Ah yes, I think I found @SebRut's package when searching for it back in June. I would definitely support getting it working on Chocolatey. @DanPristupov would it be possible for you to publish all the Windows version releases in some sort of public feed? Maybe just an extension of https://git-fork.com/releasenotes?
I found https://git-fork.com/releasenoteswin but it seems like PATCH versions (https://semver.org/) aren't listed there. My client is on 1.18.1 while the release notes only mention 1.18.
I guess it isn't ideal, but won't Fork auto-update once you've installed 1.18 via Chocolatey?
That is true, but chocolatey enforces checksum validation, which isn't possible when the version in the package is 1.18 but the file available on Forks website is 1.18.1 and because of that has a different checksum. A separate download link for each version would solve this problem too.
There's that file which is used by auto-update: https://git-fork.com/update/win/RELEASES
There's that file which is used by auto-update: https://git-fork.com/update/win/RELEASES
Thank you! That should be enough. Do you know what kind of hash that is?
@SebRut This file is generated by Squirrel (https://github.com/Squirrel/Squirrel.Windows). I briefly checked their source, it looks like it's SHA1.
Thank you.
So, it looks like Chocolatey can install an initial application version and then Fork will handle the updates.
Yes, I'll update the chocolatey package today or tomorrow, everything should work after this.
Exciting! Thanks @SebRut!
Up-To-Date version is online!
Hi @SebRut,
I've just given it a go with
choco install git-fork
and I got this error:
Downloading git-fork from 'https://git-fork.com/update/win/ForkInstaller.exe' Progress: 100% - Completed download of C:\Users\Tim Hacker\AppData\Local\Temp\chocolatey\git-fork\1.18.1\ForkInstaller.exe (40.56 MB). Download of ForkInstaller.exe (40.56 MB) completed. Error - hashes do not match. Actual value was '461DEE4244F7F394DC60824B8E5873AA2ABE2808BF63F10C77A372951FA45367D7BF97110FE1A5910C64843766239D80C6CC922375EB879A24194DAD10D89890'. ERROR: Checksum for 'C:\Users\Tim Hacker\AppData\Local\Temp\chocolatey\git-fork\1.18.1\ForkInstaller.exe' did not meet '6ffda3f17d47770869c6bc94de3e27ce906873808538c0e437283a2d6ed9ea7f' for checksum type 'sha512'. Consider passing the actual checksums through with --checksum --checksum64 once you validate the checksums are appropriate. A less secure option is to pass --ignore-checksums if necessary. The install of git-fork was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\git-fork\tools\chocolateyInstall.ps1'. See log for details.
Is this the older version still on Chocolatey? Or is this a different issue?
Just want to mention that I can publish some file which will contain a checksum of the actual ForkInstaller.exe. The file generation can be a part of the Fork build process.
Is this the older version still on Chocolatey? Or is this a different issue?
I forgot to change to checksum type back to sha256, should be fixed in minutes :)
Just want to mention that I can publish some file which will contain a checksum of the actual ForkInstaller.exe.
This would be even better.
New version is up, @TimHacker could you test it with choco install git-fork --version 1.18.1.20180718
?
Yes, that works perfectly. Thanks @SebRut! 🙌
Hi @SebRut, I'm getting an issue with the checksum again. Both with choco install git-fork
and choco install git-fork --version 1.18.1.20180718
:
Error - hashes do not match. Actual value was '1287B648A5797FC15EEBD25B67007C86368751F9821458F676409511D5A34167'.
ERROR: Checksum for 'C:\Users\Tim Hacker\AppData\Local\Temp\chocolatey\git-fork\1.18.1.20180718\ForkInstaller.exe' did not meet '6ffda3f17d47770869c6bc94de3e27ce906873808538c0e437283a2d6ed9ea7f' for checksum type 'sha256'. Consider passing the actual checksums through with --checksum --checksum64 once you validate the checksums are appropriate. A less secure option is to pass --ignore-checksums if necessary.
The install of git-fork was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\git-fork\tools\chocolateyInstall.ps1'.
See log for details.
Chocolatey installed 0/1 packages. 1 packages failed.
@TimHacker thank you for the head up, I made a mistake with the checksum type and pushed an updated version manually for now. Upcoming releases should (hopefully) work automatically.
Perfect, the new unapproved version works well. 👌
FYI, I'm planning to switch to a different installer in the near future because Squirrel makes too much problems with antiviral applications. The EXE installation package will be replaced with MSI. I'll let you know the details as far as I make a proof-of-concept.
FYI, I'm planning to switch to a different installer in the near future because Squirrel makes too much problems with antiviral applications. The EXE installation package will be replaced with MSI. I'll let you know the details as far as I make a proof-of-concept.
Sounds good!
@DanPristupov could you tell me which files contain the configuration like Display Name and E-mail because currently every upgrade using chocolatey seems to delete the configuration and leads to reentering the information mentioned above.
Hm, I think Fork update should be performed on it's own. Fork uses delta updates which are tiny (about 500 KB for an update) and also shows release notes.
--
Fork asks name and email when cannot find a git instance which is being installed on first run (because Squirrel cannot handle that).
This can change when I switch to MSI, but now there are some tricky points.
Squirrel wipes out the installation directory on install, but keeps it on update.
%localappdata%\fork\settings.json
%localappdata%\fork\git
Hm, I think Fork update should be performed on it's own. Fork uses delta updates which are tiny (about 500 KB for an update) and also shows release notes.
The problem with this is that new versions of Fork get published to chocolatey which leads to local updating seeing the installed version as outdated even when Fork updates itself via the internal updater. Many users including me just run choco update all
periodically to update all packages installed via chocolatey which leads to reconfiguring Fork after every update. To prevent this I'd add an pre- and post-install-hook which backups and restores the Fork configuration.
I think the best solution there is to disable the chocolatey update.
I think the best solution there is to disable the chocolatey update.
I just stumpled upon this guideline from chocolatey regarding self updating applications and it seems like every user would have to disable the updates by himself manually but I'll see if I can add some sort of auto disable.
I created a Chocolatey package (https://chocolatey.org/packages/git-fork) for Fork. Unfortunately it seems like you don't always publish updates with release note on your website which makes it impossible to detect these updates. Is there any way to detect the newest version number without using the Fork client?