Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use const AnalyzerManager version 1.8.3 #479

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"type": "string",
"scope": "application",
"pattern": "^$|^\\d+\\.\\d+\\.\\d+$",
"markdownDescription": "Specifies the JFrog Scanners version to use. (format X.X.X). By default the latest scanners version is used."
"markdownDescription": "Specifies the JFrog Scanners version to use. (format X.X.X). By default the latest stable scanners version is used."
},
"jfrog.customRulesPath": {
"type": "string",
Expand Down
11 changes: 10 additions & 1 deletion src/main/scanLogic/scanRunners/analyzerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { LogUtils } from '../../log/logUtils';
export class AnalyzerManager {
private static readonly RELATIVE_DOWNLOAD_URL: string = '/xsc-gen-exe-analyzer-manager-local/v1';
private static readonly BINARY_NAME: string = 'analyzerManager';
public static readonly ANALYZER_MANAGER_VERSION: string = '1.8.3';
public static readonly ANALYZER_MANAGER_PATH: string = Utils.addWinSuffixIfNeeded(
path.join(ScanUtils.getIssuesPath(), AnalyzerManager.BINARY_NAME, AnalyzerManager.BINARY_NAME)
);
Expand Down Expand Up @@ -46,14 +47,22 @@ export class AnalyzerManager {
return Utils.addZipSuffix(
AnalyzerManager.RELATIVE_DOWNLOAD_URL +
'/' +
Configuration.getAnalyzerManagerVersion() +
AnalyzerManager.getAnalyzerManagerVersion() +
'/' +
Utils.getPlatformAndArch() +
'/' +
AnalyzerManager.BINARY_NAME
);
}

private static getAnalyzerManagerVersion(): string {
let version: string = Configuration.getAnalyzerManagerVersion();
if (version !== '') {
return version;
}
return AnalyzerManager.ANALYZER_MANAGER_VERSION;
}

private createJFrogCLient(): JfrogClient {
const releasesRepo: JfrogClient | undefined = this.getExternalResourcesRepository();
if (!releasesRepo) {
Expand Down
6 changes: 1 addition & 5 deletions src/main/utils/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ export class Configuration {
}

public static getAnalyzerManagerVersion(): string {
let version: string = vscode.workspace.getConfiguration(this.jfrogSectionConfigurationKey).get('useSpecificScannersVersion', '');
if (version === '') {
version = '[RELEASE]';
}
return version;
return vscode.workspace.getConfiguration(this.jfrogSectionConfigurationKey).get('useSpecificScannersVersion', '');
}

public static getSastCustomRulesPath(logManager?: LogManager): string {
Expand Down
Loading