Skip to content

Commit

Permalink
refactor(updater): Move type constant to update providers
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed Jun 13, 2022
1 parent 956487e commit 5ca525e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/lib/updater/Updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ class Updater {


switch (this.updaterConfig.updateProvider.type) {
case "github":
case GithubValetudoUpdateProvider.TYPE:
this.updateProvider = new GithubValetudoUpdateProvider();
break;
case "github_nightly":
case GithubValetudoNightlyUpdateProvider.TYPE:
this.updateProvider = new GithubValetudoNightlyUpdateProvider();
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class GithubValetudoNightlyUpdateProvider extends ValetudoUpdateProvider {
}


GithubValetudoNightlyUpdateProvider.TYPE = "github_nightly";

GithubValetudoNightlyUpdateProvider.REPO_URL = "https://api.github.com/repos/Hypfer/valetudo-nightly-builds/branches/master";
GithubValetudoNightlyUpdateProvider.ASSET_BASE_URL = "https://raw.githubusercontent.com/Hypfer/valetudo-nightly-builds/master/";
GithubValetudoNightlyUpdateProvider.MANIFEST_NAME = "valetudo_release_manifest.json";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ class GithubValetudoUpdateProvider extends ValetudoUpdateProvider {
}


GithubValetudoUpdateProvider.TYPE = "github";

GithubValetudoUpdateProvider.RELEASES_URL = "https://api.github.com/repos/Hypfer/Valetudo/releases";
GithubValetudoUpdateProvider.MANIFEST_NAME = "valetudo_release_manifest.json";

Expand Down

0 comments on commit 5ca525e

Please sign in to comment.