Closed WantClue closed 1 month ago
With the latest pre-release which has been removed now we had experienced the issue, that certain people updated. In order to fight this issue of not downloading pre-releases I suggest an change to the github-update.service.ts
The change would be as followed:
import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; interface GithubRelease { tag_name: string; prerelease: boolean; } @Injectable({ providedIn: 'root' }) export class GithubUpdateService { constructor( private httpClient: HttpClient ) { } public getReleases(): Observable<GithubRelease[]> { return this.httpClient.get<GithubRelease[]>( 'https://api.github.com/repos/skot/esp-miner/releases?per_page=100' ); } public getLatestStableRelease(): Observable<GithubRelease | null> { return this.getReleases().pipe( map(releases => releases.find(release => !release.prerelease) || null) ); } }
in settings.components.ts:
this.latestRelease$ = this.githubUpdateService.getLatestStableRelease();
This would be amazing. I think pre-releases are a good way to roll out firmware to more experienced users who are willing to beta test new firmware.
Done in PR #285
With the latest pre-release which has been removed now we had experienced the issue, that certain people updated. In order to fight this issue of not downloading pre-releases I suggest an change to the github-update.service.ts
The change would be as followed:
in settings.components.ts:
this.latestRelease$ = this.githubUpdateService.getLatestStableRelease();