mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix auto-update channel checking and pinning (#4030)
This commit is contained in:
1 parent
743e7f2b36
commit
3988229a6c
5 files changed
+33
-31
No files matched your search
@@ -23,9 +23,10 @@ import moment from "moment-timezone";
|
||||
import path from "path";
|
||||
import os from "os";
|
||||
import { ThemeStore } from "../../renderer/theme.store";
|
||||
import { ObservableToggleSet } from "../utils";
|
||||
import { getAppVersion, ObservableToggleSet } from "../utils";
|
||||
import type {monaco} from "react-monaco-editor";
|
||||
import merge from "lodash/merge";
|
||||
import { SemVer } from "semver";
|
||||
|
||||
export interface KubeconfigSyncEntry extends KubeconfigSyncValue {
|
||||
filePath: string;
|
||||
@@ -260,9 +261,8 @@ const editorConfiguration: PreferenceDescription<EditorConfiguration, EditorConf
|
||||
},
|
||||
};
|
||||
|
||||
const defaultUpdateChannel = "latest";
|
||||
const updateChannels = new Map([
|
||||
[defaultUpdateChannel, {
|
||||
["latest", {
|
||||
label: "Stable"
|
||||
}],
|
||||
["beta", {
|
||||
@@ -272,6 +272,7 @@ const updateChannels = new Map([
|
||||
label: "Alpha"
|
||||
}],
|
||||
]);
|
||||
const defaultUpdateChannel = new SemVer(getAppVersion()).prerelease[0]?.toString() || "latest";
|
||||
|
||||
const updateChannel: PreferenceDescription<string> = {
|
||||
fromStore(val) {
|
||||
@@ -318,6 +319,5 @@ export const DESCRIPTORS = {
|
||||
};
|
||||
|
||||
export const CONSTANTS = {
|
||||
defaultUpdateChannel,
|
||||
updateChannels,
|
||||
};
|
||||
Reference in new issue
Block a user