Skip to content

Commit

Permalink
Update CLI version (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea authored Dec 26, 2024
1 parent 317a362 commit ac9f827
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: "JFrog"
inputs:
version:
description: "JFrog CLI Version"
default: "2.72.3"
default: "2.72.4"
required: false
download-repository:
description: "Remote repository in Artifactory pointing to 'https://releases.jfrog.io/artifactory/jfrog-cli'. Use this parameter in case you don't have an Internet access."
Expand Down
5 changes: 4 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,10 @@ class Utils {
return Utils.getMarkdownHeader() + fileContent + Utils.getMarkdownFooter();
}
static getMarkdownFooter() {
return '\n\n # \n\n The above Job Summary was generated by the <a href="https://github.com/marketplace/actions/setup-jfrog-cli"> Setup JFrog CLI GitHub Action </a>';
return `\n\n # \n\n ${this.getUsageBadge()} \n\n The above Job Summary was generated by the <a href="https://github.com/marketplace/actions/setup-jfrog-cli"> Setup JFrog CLI GitHub Action </a>`;
}
static getUsageBadge() {
return `![](${process.env.JF_URL}/ui/api/v1/u?s=1&m=1&job_id=${process.env.GITHUB_JOB}&run_id=${process.env.GITHUB_RUN_ID}&git_repo=${process.env.GITHUB_REPOSITORY})`;
}
static isHeaderPngAccessible() {
return __awaiter(this, void 0, void 0, function* () {
Expand Down
2 changes: 1 addition & 1 deletion node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jfrog/setup-jfrog-cli",
"version": "4.5.3",
"version": "4.5.4",
"private": true,
"description": "Setup JFrog CLI in GitHub Actions",
"main": "lib/main.js",
Expand Down
10 changes: 7 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,9 @@ export class Utils {
Utils.enableJobSummaries();
}

Utils.setUsageEnvVars()
Utils.setUsageEnvVars();
}

// Set usage variables to be captured by JFrog CLI visibility metric service.
public static setUsageEnvVars(): void {
// Set the GitHub repository name or default to an empty string.
Expand Down Expand Up @@ -906,7 +906,11 @@ export class Utils {
}

private static getMarkdownFooter() {
return '\n\n # \n\n The above Job Summary was generated by the <a href="https://github.com/marketplace/actions/setup-jfrog-cli"> Setup JFrog CLI GitHub Action </a>';
return `\n\n # \n\n ${this.getUsageBadge()} \n\n The above Job Summary was generated by the <a href="https://github.com/marketplace/actions/setup-jfrog-cli"> Setup JFrog CLI GitHub Action </a>`;
}

private static getUsageBadge(): string {
return `![](${process.env.JF_URL}/ui/api/v1/u?s=1&m=1&job_id=${process.env.GITHUB_JOB}&run_id=${process.env.GITHUB_RUN_ID}&git_repo=${process.env.GITHUB_REPOSITORY})`;
}

private static async isHeaderPngAccessible(): Promise<boolean> {
Expand Down
2 changes: 0 additions & 2 deletions test/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ describe('Utils.removeJFrogServers', () => {
});
});


describe('getApplicationKey', () => {
const mockReadFile: jest.Mock = fs.promises.readFile as jest.Mock;
const mockExistsSync: jest.Mock = fs.existsSync as jest.Mock;
Expand Down Expand Up @@ -568,4 +567,3 @@ describe('setUsageEnvVars', () => {
expect(core.exportVariable).toHaveBeenCalledWith('JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED', false);
});
});

0 comments on commit ac9f827

Please sign in to comment.