mirror of
https://github.com/desktop/desktop
synced 2024-08-24 18:57:33 +00:00
Merge pull request #13813 from desktop/Enable-manual-check-for-updates-on-test
Enable manual "check for updates" on test builds
This commit is contained in:
commit
f54b3aa508
|
@ -90,8 +90,8 @@ export async function getChangeLog(
|
|||
'https://central.github.com/deployments/desktop/desktop/changelog.json'
|
||||
)
|
||||
|
||||
if (__RELEASE_CHANNEL__ === 'beta') {
|
||||
changelogURL.searchParams.set('env', 'beta')
|
||||
if (__RELEASE_CHANNEL__ === 'beta' || __RELEASE_CHANNEL__ === 'test') {
|
||||
changelogURL.searchParams.set('env', __RELEASE_CHANNEL__)
|
||||
}
|
||||
|
||||
if (limit !== undefined) {
|
||||
|
|
|
@ -95,10 +95,7 @@ export class About extends React.Component<IAboutProps, IAboutState> {
|
|||
}
|
||||
|
||||
private renderUpdateButton() {
|
||||
if (
|
||||
__RELEASE_CHANNEL__ === 'development' ||
|
||||
__RELEASE_CHANNEL__ === 'test'
|
||||
) {
|
||||
if (__RELEASE_CHANNEL__ === 'development') {
|
||||
return null
|
||||
}
|
||||
|
||||
|
@ -180,14 +177,11 @@ export class About extends React.Component<IAboutProps, IAboutState> {
|
|||
return null
|
||||
}
|
||||
|
||||
if (
|
||||
__RELEASE_CHANNEL__ === 'development' ||
|
||||
__RELEASE_CHANNEL__ === 'test'
|
||||
) {
|
||||
if (__RELEASE_CHANNEL__ === 'development') {
|
||||
return (
|
||||
<p>
|
||||
The application is currently running in development or test mode and
|
||||
will not receive any updates.
|
||||
The application is currently running in development and will not
|
||||
receive any updates.
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
@ -216,10 +210,7 @@ export class About extends React.Component<IAboutProps, IAboutState> {
|
|||
return null
|
||||
}
|
||||
|
||||
if (
|
||||
__RELEASE_CHANNEL__ === 'development' ||
|
||||
__RELEASE_CHANNEL__ === 'test'
|
||||
) {
|
||||
if (__RELEASE_CHANNEL__ === 'development') {
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
|
@ -253,10 +253,7 @@ export class App extends React.Component<IAppProps, IAppState> {
|
|||
const status = state.status
|
||||
|
||||
if (
|
||||
!(
|
||||
__RELEASE_CHANNEL__ === 'development' ||
|
||||
__RELEASE_CHANNEL__ === 'test'
|
||||
) &&
|
||||
!(__RELEASE_CHANNEL__ === 'development') &&
|
||||
status === UpdateStatus.UpdateReady
|
||||
) {
|
||||
this.props.dispatcher.setUpdateBannerVisibility(true)
|
||||
|
@ -302,8 +299,14 @@ export class App extends React.Component<IAppProps, IAppState> {
|
|||
|
||||
this.props.dispatcher.installGlobalLFSFilters(false)
|
||||
|
||||
setInterval(() => this.checkForUpdates(true), UpdateCheckInterval)
|
||||
this.checkForUpdates(true)
|
||||
// We only want to automatically check for updates on beta and prod
|
||||
if (
|
||||
__RELEASE_CHANNEL__ !== 'development' &&
|
||||
__RELEASE_CHANNEL__ !== 'test'
|
||||
) {
|
||||
setInterval(() => this.checkForUpdates(true), UpdateCheckInterval)
|
||||
this.checkForUpdates(true)
|
||||
}
|
||||
|
||||
log.info(`launching: ${getVersion()} (${getOS()})`)
|
||||
log.info(`execPath: '${process.execPath}'`)
|
||||
|
@ -555,14 +558,7 @@ export class App extends React.Component<IAppProps, IAppState> {
|
|||
}
|
||||
|
||||
private checkForUpdates(inBackground: boolean) {
|
||||
if (__LINUX__) {
|
||||
return
|
||||
}
|
||||
|
||||
if (
|
||||
__RELEASE_CHANNEL__ === 'development' ||
|
||||
__RELEASE_CHANNEL__ === 'test'
|
||||
) {
|
||||
if (__LINUX__ || __RELEASE_CHANNEL__ === 'development') {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue