\#28: Fix Linux upgrade

This commit is contained in:
Scott E. Graves
2019-07-04 17:42:48 -05:00
parent 0d524376d1
commit a2c66f1047
6 changed files with 27 additions and 21 deletions

View File

@@ -113,9 +113,12 @@ class App extends IPCContainer {
};
handleDownloadUpgrade = () => {
const url = this.props.UpgradeData.urls[0];
const name = this.props.Platform === 'win32' ? 'upgrade.exe' : this.props.Platform === 'darwin' ? 'upgrade.dmg' : extractFileNameFromURL(url);
this.props.downloadItem(name, Constants.INSTALL_TYPES.Upgrade, url, this.onDownloadFileComplete);
const name = (this.props.Platform === 'win32') ?
'upgrade.exe' :
(this.props.Platform === 'darwin') ?
'upgrade.dmg' :
'repertory-ui_' + this.props.UpgradeVersion + '_linux_x86_64.AppImage';
this.props.downloadItem(name, Constants.INSTALL_TYPES.Upgrade, this.props.UpgradeData.urls[0], this.onDownloadFileComplete);
};
installDependency = result => {
@@ -338,6 +341,7 @@ const mapStateToProps = state => {
UpgradeAvailable: state.relver.UpgradeAvailable,
UpgradeData: state.relver.UpgradeData,
UpgradeDismissed: state.relver.UpgradeDismissed,
UpgradeVersion: state.relver.UpgradeVersion,
Version: state.common.Version,
VersionLookup: state.relver.VersionLookup,
};