-
Notifications
You must be signed in to change notification settings - Fork 908
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch update logic to use Download Center based metadata links (#25677…
…) (#25682) * switch to client side update * lower version to 1.47 for testing * cleanup * move download center def/links to one file * more sql carbon tags * revert version change * move urls to product.json * fix isLatestVersion * fix Mac meatdata urls
- Loading branch information
Showing
7 changed files
with
113 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
src/vs/platform/update/electron-main/updateMetadataProvider.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
// {{SQL CARBON EDIT}} - This file contains interfaces, util functions and url definitions | ||
// to support Download Center based update. | ||
import { IProductService } from 'vs/platform/product/common/productService'; | ||
import { IUpdate } from 'vs/platform/update/common/update'; | ||
|
||
export interface Asset { | ||
platform: string; | ||
type: string; | ||
url: string; | ||
mooncakeUrl: string; | ||
hash: string; | ||
sha256hash?: string; | ||
packageCatalog?: string; | ||
repoDefinition?: string; | ||
repoDataFiles?: string[]; | ||
} | ||
|
||
export interface Build { | ||
id: string; | ||
version: string; | ||
isFrozen?: boolean; | ||
assets: Asset[]; | ||
updates: { [platform: string]: string; }; | ||
} | ||
|
||
export function getUpdateFromBuild(build: Build | null, productService: IProductService, platform: string): IUpdate | undefined { | ||
if (!build) { | ||
return undefined; | ||
} | ||
|
||
if (build.id === productService.commit) { | ||
return undefined; | ||
} | ||
|
||
const assetType = build.updates[platform]; | ||
const asset = build.assets.filter(a => a.platform === platform && a.type === assetType)[0]; | ||
|
||
if (!asset) { | ||
return undefined; | ||
} | ||
|
||
const url = asset.url; | ||
return { | ||
url: url, | ||
version: build.id, | ||
productVersion: build.version, | ||
hash: asset.hash, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters