ソースを参照

Prepares for unified insiders builds

main
Eric Amodio 2年前
コミット
a6601bb51f
3個のファイルの変更13行の追加12行の削除
  1. +1
    -1
      CONTRIBUTING.md
  2. +7
    -6
      src/container.ts
  3. +5
    -5
      src/extension.ts

+ 1
- 1
CONTRIBUTING.md ファイルの表示

@ -201,4 +201,4 @@ If the action fails, the VSIX will need to be built locally with `yarn package`
### Insiders release
The [Publish Insiders workflow](.github/workflows/cd-insiders.yml) is automatically ran every AM unless no new changes have been committed to `main`.
The [Publish Insiders workflow](.github/workflows/cd-insiders.yml) is automatically run every AM unless no new changes have been committed to `main`.

+ 7
- 6
src/container.ts ファイルの表示

@ -78,10 +78,10 @@ export class Container {
},
});
static create(context: ExtensionContext, cfg: Config) {
static create(context: ExtensionContext, cfg: Config, insiders: boolean) {
if (Container.#instance != null) throw new Error('Container is already initialized');
Container.#instance = new Container(context, cfg);
Container.#instance = new Container(context, cfg, insiders);
return Container.#instance;
}
@ -152,9 +152,10 @@ export class Container {
private _terminalLinks: GitTerminalLinkProvider | undefined;
private constructor(context: ExtensionContext, config: Config) {
private constructor(context: ExtensionContext, config: Config, insiders: boolean) {
this._context = context;
this._config = this.applyMode(config);
this._insiders = insiders;
context.subscriptions.push((this._storage = new Storage(this._context)));
@ -311,7 +312,7 @@ export class Container {
return this._config;
}
private _context: ExtensionContext;
private readonly _context: ExtensionContext;
get context() {
return this._context;
}
@ -409,9 +410,9 @@ export class Container {
return this._homeView;
}
@memoize()
private readonly _insiders;
get insiders() {
return this._context.extension.id.endsWith('-insiders');
return this._insiders;
}
private _integrationAuthentication: IntegrationAuthenticationService;

+ 5
- 5
src/extension.ts ファイルの表示

@ -17,12 +17,12 @@ import { executeCommand, executeCoreCommand, registerCommands } from './system/c
import { setDefaultDateLocales } from './system/date';
import { once } from './system/event';
import { Stopwatch } from './system/stopwatch';
import { compare } from './system/version';
import { compare, satisfies } from './system/version';
import { ViewNode } from './views/nodes';
export async function activate(context: ExtensionContext): Promise<GitLensApi | undefined> {
const insiders = context.extension.id === 'eamodio.gitlens-insiders';
const gitlensVersion = context.extension.packageJSON.version;
const insiders = context.extension.id === 'eamodio.gitlens-insiders' || satisfies(gitlensVersion, '> 2020.0.0');
Logger.configure(context, configuration.get('outputLevel'), o => {
if (GitUri.is(o)) {
@ -47,8 +47,8 @@ export async function activate(context: ExtensionContext): Promise
},
});
if (insiders) {
// Ensure that stable isn't also installed
// If we are using the separate insiders extension, ensure that stable isn't also installed
if (context.extension.id === 'eamodio.gitlens-insiders') {
const stable = extensions.getExtension('eamodio.gitlens');
if (stable != null) {
sw.stop({ message: ' was NOT activated because GitLens is also enabled' });
@ -107,7 +107,7 @@ export async function activate(context: ExtensionContext): Promise
// await migrateSettings(context, previousVersion);
const container = Container.create(context, cfg);
const container = Container.create(context, cfg, insiders);
once(container.onReady)(() => {
context.subscriptions.push(...registerCommands(container));
registerBuiltInActionRunners(container);

読み込み中…
キャンセル
保存