mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-15 16:14:13 +00:00
nightly build
This commit is contained in:
@@ -35,6 +35,14 @@ function getBuildLabel(): string {
|
||||
return typeof __BUILD_LABEL__ !== "undefined" ? __BUILD_LABEL__ : "";
|
||||
}
|
||||
|
||||
function formatNightlyLabel(buildDate: string): string {
|
||||
return buildDate ? `nightly (${buildDate})` : "nightly";
|
||||
}
|
||||
|
||||
function nightlyDateFromPublishedAt(publishedAt: string): string {
|
||||
return publishedAt.slice(0, 10);
|
||||
}
|
||||
|
||||
function getCurrentVersion(): string {
|
||||
return browser.runtime.getManifest().version;
|
||||
}
|
||||
@@ -158,8 +166,7 @@ async function checkNightlyUpdate(): Promise<GhReleaseUpdateInfo> {
|
||||
}
|
||||
|
||||
const lastSeen = settingsState.lastSeenNightlyPublishedAt;
|
||||
const buildLabel = getBuildLabel();
|
||||
const label = buildLabel ? `nightly #${buildLabel}` : "nightly";
|
||||
const label = formatNightlyLabel(nightlyDateFromPublishedAt(release.published_at));
|
||||
|
||||
if (!lastSeen) {
|
||||
settingsState.lastSeenNightlyPublishedAt = release.published_at;
|
||||
@@ -177,6 +184,12 @@ export function isGhReleaseUpdateCheckEnabled(): boolean {
|
||||
return isUpdateCheckEnabled();
|
||||
}
|
||||
|
||||
/** Label for the installed GitHub release build (e.g. `nightly (2025-06-10)`). */
|
||||
export function getInstalledGhReleaseChannelLabel(): string | null {
|
||||
if (!isUpdateCheckEnabled() || getUpdateChannel() !== "nightly") return null;
|
||||
return formatNightlyLabel(getBuildLabel());
|
||||
}
|
||||
|
||||
export async function checkGithubReleaseUpdate(): Promise<GhReleaseUpdateInfo> {
|
||||
const fallback = { available: false, label: "", url: releasesBaseUrl() };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user