Skip to content

Commit

Permalink
Clear marketplace cache during upgrade (#1628)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan N. Klug <[email protected]>
  • Loading branch information
J-N-K authored Jan 14, 2024
1 parent 3c484da commit cd4c3b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions distributions/openhab/src/main/resources/bin/update
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ done < "$TempDir/filelist.lst"
echo "Clearing cache..."
rm -rf "${OPENHAB_USERDATA:?}/cache"
rm -rf "${OPENHAB_USERDATA:?}/tmp"
rm -rf "${OPENHAB_USERDATA:?}/marketplace"

## Unzip the downloaded folder into openHAB's directory WITHOUT replacing any existing files.
echo "Updating openHAB..."
Expand Down
7 changes: 7 additions & 0 deletions distributions/openhab/src/main/resources/bin/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,13 @@ Function Update-openHAB() {
return PrintAndThrow "Could not delete the $OHUserData\tmp directory" $_
}

try {
Write-Host -ForegroundColor Cyan "Removing $OHUserData\marketplace"
DeleteIfExists "$OHUserData\marketplace" $True
} catch {
return PrintAndThrow "Could not delete the $OHUserData\marketplace directory" $_
}

############## STEP 4 - copy files from temporary to distribution WITHOUT replacement
Write-Host -ForegroundColor Cyan "Copying $TempDistribution to $OHDirectory without overwriting existing ones"
try {
Expand Down

0 comments on commit cd4c3b7

Please sign in to comment.