From fb6e655de8a44c65275ad45a27bf5bd684670ba0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 17 Mar 2020 12:44:31 +0100 Subject: Rewrite auto-update Everything now happens in main.ts, in the bootstrap family of functions. The current flow is: * check everything only on extension installation. * if the user is on nightly channel, try to download the nightly extension and reload. * when we install nightly extension, we persist its release id, so that we can check if the current release is different. * if server binary was not downloaded by the current version of the extension, redownload it (we persist the version of ext that downloaded the server). --- editors/code/src/installation/interfaces.ts | 63 ----------------------------- 1 file changed, 63 deletions(-) delete mode 100644 editors/code/src/installation/interfaces.ts (limited to 'editors/code/src/installation/interfaces.ts') diff --git a/editors/code/src/installation/interfaces.ts b/editors/code/src/installation/interfaces.ts deleted file mode 100644 index 1a8ea0884..000000000 --- a/editors/code/src/installation/interfaces.ts +++ /dev/null @@ -1,63 +0,0 @@ -export interface GithubRepo { - name: string; - owner: string; -} - -/** - * Metadata about particular artifact retrieved from GitHub releases. - */ -export interface ArtifactReleaseInfo { - releaseDate: Date; - releaseName: string; - downloadUrl: string; -} - -/** - * Represents the source of a an artifact which is either specified by the user - * explicitly, or bundled by this extension from GitHub releases. - */ -export type ArtifactSource = ArtifactSource.ExplicitPath | ArtifactSource.GithubRelease; - -export namespace ArtifactSource { - /** - * Type tag for `ArtifactSource` discriminated union. - */ - export const enum Type { ExplicitPath, GithubRelease } - - export interface ExplicitPath { - type: Type.ExplicitPath; - - /** - * Filesystem path to the binary specified by the user explicitly. - */ - path: string; - } - - export interface GithubRelease { - type: Type.GithubRelease; - - /** - * Repository where the binary is stored. - */ - repo: GithubRepo; - - - // FIXME: add installationPath: string; - - /** - * Directory on the filesystem where the bundled binary is stored. - */ - dir: string; - - /** - * Name of the binary file. It is stored under the same name on GitHub releases - * and in local `.dir`. - */ - file: string; - - /** - * Tag of github release that denotes a version required by this extension. - */ - tag: string; - } -} -- cgit v1.2.3