Skip to content

Commit

Permalink
logseq now checks local version before upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
w0 authored Oct 29, 2023
1 parent 6a0f889 commit bfa41e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions logseq/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$softwareName = 'Logseq'
$version = '0.9.19'
if ($version -eq (Get-UninstallRegistryKey "$softwareName").DisplayVersion) {
Write-Host "Logseq $version is already installed."
return
}

$packageArgs = @{
packageName = $env:ChocolateyPackageName
unzipLocation = $toolsDir
Expand Down
5 changes: 4 additions & 1 deletion logseq/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ function global:au_SearchReplace {
"(?i)(\s+x32:).*" = "`${1} $($Latest.URL32)"
"(?i)(checksum32:).*" = "`${1} $($Latest.Checksum32)"
}


"tools\chocolateyInstall.ps1" = @{
"(?i)(^[$]version\s*=\s*)('.*')" = "`$1'$($Latest.Version)'"
}
}
}

Expand Down

0 comments on commit bfa41e6

Please sign in to comment.