Skip to content

Commit ac9f827

Browse files
authored
Update CLI version (#239)
1 parent 317a362 commit ac9f827

File tree

7 files changed

+16
-11
lines changed

7 files changed

+16
-11
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "JFrog"
44
inputs:
55
version:
66
description: "JFrog CLI Version"
7-
default: "2.72.3"
7+
default: "2.72.4"
88
required: false
99
download-repository:
1010
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."

lib/utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,10 @@ class Utils {
821821
return Utils.getMarkdownHeader() + fileContent + Utils.getMarkdownFooter();
822822
}
823823
static getMarkdownFooter() {
824-
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>';
824+
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>`;
825+
}
826+
static getUsageBadge() {
827+
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})`;
825828
}
826829
static isHeaderPngAccessible() {
827830
return __awaiter(this, void 0, void 0, function* () {

node_modules/.package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jfrog/setup-jfrog-cli",
3-
"version": "4.5.3",
3+
"version": "4.5.4",
44
"private": true,
55
"description": "Setup JFrog CLI in GitHub Actions",
66
"main": "lib/main.js",

src/utils.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,9 @@ export class Utils {
520520
Utils.enableJobSummaries();
521521
}
522522

523-
Utils.setUsageEnvVars()
523+
Utils.setUsageEnvVars();
524524
}
525-
525+
526526
// Set usage variables to be captured by JFrog CLI visibility metric service.
527527
public static setUsageEnvVars(): void {
528528
// Set the GitHub repository name or default to an empty string.
@@ -906,7 +906,11 @@ export class Utils {
906906
}
907907

908908
private static getMarkdownFooter() {
909-
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>';
909+
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>`;
910+
}
911+
912+
private static getUsageBadge(): string {
913+
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})`;
910914
}
911915

912916
private static async isHeaderPngAccessible(): Promise<boolean> {

test/main.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,6 @@ describe('Utils.removeJFrogServers', () => {
472472
});
473473
});
474474

475-
476475
describe('getApplicationKey', () => {
477476
const mockReadFile: jest.Mock = fs.promises.readFile as jest.Mock;
478477
const mockExistsSync: jest.Mock = fs.existsSync as jest.Mock;
@@ -568,4 +567,3 @@ describe('setUsageEnvVars', () => {
568567
expect(core.exportVariable).toHaveBeenCalledWith('JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED', false);
569568
});
570569
});
571-

0 commit comments

Comments
 (0)