mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-11-04 18:23:59 +00:00
- Flatpak manifest (GNOME 51, libvlc built from source) installing from a new portable spotube-linux-<version>-<arch>.tar.xz, shared with the AUR package - Release workflow builds and attaches the Linux tarballs for x86_64 and aarch64 - Package files are JMustache templates rendered by :composeApp:renderPackaging<Target> with the version, release asset checksums and git-cliff release notes; the metainfo release history is generated - Publish workflow (workflow_dispatch, release tag input) renders once and pushes to Flathub, the AUR, WinGet (PR from team-spotube/winget-pkgs) and Chocolatey - Chocolatey and WinGet updated for the NSIS installer
32 lines
1.1 KiB
PowerShell
32 lines
1.1 KiB
PowerShell
$ErrorActionPreference = 'Stop'; # stop on all errors
|
|
$packageArgs = @{
|
|
packageName = $env:ChocolateyPackageName
|
|
softwareName = 'Spotube*'
|
|
fileType = 'exe'
|
|
validExitCodes= @(0)
|
|
}
|
|
|
|
[array]$key = Get-UninstallRegistryKey -SoftwareName $packageArgs['softwareName']
|
|
|
|
if ($key.Count -eq 1) {
|
|
$key | % {
|
|
# electron-builder writes UninstallString as "<dir>\Uninstall Spotube.exe" /currentuser
|
|
if ($_.UninstallString -match '^\s*"([^"]+)"\s*(.*)$') {
|
|
$packageArgs['file'] = $Matches[1]
|
|
$packageArgs['silentArgs'] = "$($Matches[2]) /S".Trim()
|
|
} else {
|
|
$packageArgs['file'] = $_.UninstallString
|
|
$packageArgs['silentArgs'] = '/S'
|
|
}
|
|
|
|
Uninstall-ChocolateyPackage @packageArgs
|
|
}
|
|
} elseif ($key.Count -eq 0) {
|
|
Write-Warning "$packageName has already been uninstalled by other means."
|
|
} elseif ($key.Count -gt 1) {
|
|
Write-Warning "$($key.Count) matches found!"
|
|
Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
|
|
Write-Warning "Please alert package maintainer the following keys were matched:"
|
|
$key | % {Write-Warning "- $($_.DisplayName)"}
|
|
}
|