Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear marketplace cache during upgrade #1628

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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