Skip to content

Commit

Permalink
fix: Remove temp update files before starting new update process
Browse files Browse the repository at this point in the history
  • Loading branch information
jagodevreede committed Sep 23, 2024
1 parent 0955ca3 commit d3e5a31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
path: ~/.m2/repository
save-always: true
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Version
id: vars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public void runUpdate() {
try {
File tempFile = new File(serviceRegistry.getApi().getBaseFolder(), "tmp/ui-update.tmp");
File destFile = new File(serviceRegistry.getApi().getBaseFolder(), "tmp/ui-update.bin");
// Remove old first, as download could be interrupted
tempFile.delete();
destFile.delete();

Optional<String> downloadUrl = getDownloadUrl(getLatestGitHubRelease().getLatestReleaseDownloads());
if (!downloadUrl.isPresent()) {
Expand Down

0 comments on commit d3e5a31

Please sign in to comment.