Skip to content

Commit

Permalink
Use getProjectYear for vendordep marketplace (#736)
Browse files Browse the repository at this point in the history
This results in using "2025beta" for the beta releases.
  • Loading branch information
rzblue authored Dec 17, 2024
1 parent b9ceadd commit 1c87f1f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions vscode-wpilib/src/dependencyView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,17 @@ export class DependencyViewProvider implements vscode.WebviewViewProvider {

public async getAvailableDependencies(): Promise<IJsonList[]> {
this.homeDeps = [];
const listURL = this.vendordepMarketplaceURL + `${this.externalApi.getUtilitiesAPI().getFrcYear()}.json`;
try {
this.onlineDeps = await this.loadFileFromUrl(listURL);
} catch (err) {
logger.log('Error fetching file', err);
if(this.wp === undefined) {
this.onlineDeps = [];
} else {
const projectYear = this.externalApi.getPreferencesAPI().getPreferences(this.wp).getProjectYear();
const manifestURL = this.vendordepMarketplaceURL + `${projectYear}.json`;
try {
this.onlineDeps = await this.loadFileFromUrl(manifestURL);
} catch (err) {
logger.log('Error fetching vendordep marketplace manifest', manifestURL, err);
this.onlineDeps = [];
}
}
this.homeDeps = await this.vendorLibraries.getHomeDirDeps();
this.homeDeps.forEach((homedep) => {
Expand Down

0 comments on commit 1c87f1f

Please sign in to comment.