Use GitHub as provider for manual update url.
This commit is contained in:
parent
4eb3fd70e1
commit
50fc724b53
1 changed files with 10 additions and 4 deletions
|
@ -6,12 +6,20 @@ export const selectState = (state) => state.app || {};
|
||||||
|
|
||||||
export const selectPlatform = createSelector(selectState, (state) => state.platform);
|
export const selectPlatform = createSelector(selectState, (state) => state.platform);
|
||||||
|
|
||||||
export const selectUpdateUrl = createSelector(selectPlatform, (platform) => {
|
export const selectRemoteVersion = createSelector(selectState, (state) => state.remoteVersion);
|
||||||
|
|
||||||
|
export const selectUpdateUrl = createSelector(selectPlatform, selectRemoteVersion, (platform, releaseVersion) => {
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
return 'https://lbry.com/get/lbry.dmg';
|
return 'https://lbry.com/get/lbry.dmg';
|
||||||
case 'linux':
|
case 'linux':
|
||||||
return 'https://lbry.com/get/lbry.deb';
|
// releaseVersion can be used as the tag name
|
||||||
|
// Example: v0.53.5-alpha.test7495b
|
||||||
|
// When downloading, we need to remove the initial
|
||||||
|
// v, ending up with a file name like
|
||||||
|
// LBRY_0.53.5-alpha.test7495b.deb
|
||||||
|
const fileName = 'LBRY_' + (releaseVersion || '').replace('v', '') + '.deb';
|
||||||
|
return `https://github.com/lbryio/lbry-desktop/releases/download/${releaseVersion}/${fileName}`;
|
||||||
case 'win32':
|
case 'win32':
|
||||||
return 'https://lbry.com/get/lbry.exe';
|
return 'https://lbry.com/get/lbry.exe';
|
||||||
default:
|
default:
|
||||||
|
@ -21,8 +29,6 @@ export const selectUpdateUrl = createSelector(selectPlatform, (platform) => {
|
||||||
|
|
||||||
export const selectHasClickedComment = createSelector(selectState, (state) => state.hasClickedComment);
|
export const selectHasClickedComment = createSelector(selectState, (state) => state.hasClickedComment);
|
||||||
|
|
||||||
export const selectRemoteVersion = createSelector(selectState, (state) => state.remoteVersion);
|
|
||||||
|
|
||||||
export const selectIsUpgradeAvailable = createSelector(selectState, (state) => state.isUpgradeAvailable);
|
export const selectIsUpgradeAvailable = createSelector(selectState, (state) => state.isUpgradeAvailable);
|
||||||
|
|
||||||
export const selectUpgradeInitialized = createSelector(selectState, (state) => state.upgradeInitialized);
|
export const selectUpgradeInitialized = createSelector(selectState, (state) => state.upgradeInitialized);
|
||||||
|
|
Loading…
Reference in a new issue