mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 05:38:46 +00:00
vscode: get release date from release info
This commit is contained in:
parent
98b2a942d1
commit
0f826aec82
2 changed files with 7 additions and 14 deletions
|
@ -59,12 +59,15 @@ export async function fetchArtifactReleaseInfo(
|
|||
|
||||
return {
|
||||
releaseName: release.name,
|
||||
releaseDate: new Date(release.published_at),
|
||||
downloadUrl: artifact.browser_download_url
|
||||
};
|
||||
|
||||
// We omit declaration of tremendous amount of fields that we are not using here
|
||||
interface GithubRelease {
|
||||
name: string;
|
||||
// eslint-disable-next-line camelcase
|
||||
published_at: string;
|
||||
assets: Array<{
|
||||
name: string;
|
||||
// eslint-disable-next-line camelcase
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import * as vscode from "vscode";
|
||||
|
||||
export interface GithubRepo {
|
||||
name: string;
|
||||
owner: string;
|
||||
|
@ -9,6 +7,7 @@ export interface GithubRepo {
|
|||
* Metadata about particular artifact retrieved from GitHub releases.
|
||||
*/
|
||||
export interface ArtifactReleaseInfo {
|
||||
releaseDate: Date;
|
||||
releaseName: string;
|
||||
downloadUrl: string;
|
||||
}
|
||||
|
@ -42,6 +41,9 @@ export namespace ArtifactSource {
|
|||
*/
|
||||
repo: GithubRepo;
|
||||
|
||||
|
||||
// FIXME: add installationPath: string;
|
||||
|
||||
/**
|
||||
* Directory on the filesystem where the bundled binary is stored.
|
||||
*/
|
||||
|
@ -57,17 +59,5 @@ export namespace ArtifactSource {
|
|||
* Tag of github release that denotes a version required by this extension.
|
||||
*/
|
||||
tag: string;
|
||||
|
||||
/**
|
||||
* Object that provides `get()/update()` operations to store metadata
|
||||
* about the actual binary, e.g. its actual version.
|
||||
*/
|
||||
storage: vscode.Memento;
|
||||
|
||||
/**
|
||||
* Ask for the user permission before downloading the artifact.
|
||||
*/
|
||||
askBeforeDownload: boolean;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue