Skip to content

Commit a3e633d

Browse files
authored
Merge pull request #339 from codecov/action-version
fix: Add action version
2 parents c53d6ba + b8f6852 commit a3e633d

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

dist/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,18 @@ function onceStrict (fn) {
11011101
}
11021102

11031103

1104+
/***/ }),
1105+
1106+
/***/ 52:
1107+
/***/ (function(__unusedmodule, exports) {
1108+
1109+
"use strict";
1110+
1111+
exports.__esModule = true;
1112+
var VERSION = 'v1.5.0';
1113+
exports["default"] = VERSION;
1114+
1115+
11041116
/***/ }),
11051117

11061118
/***/ 82:
@@ -7176,6 +7188,7 @@ exports.checkBypass = checkBypass;
71767188
exports.__esModule = true;
71777189
var core = __webpack_require__(470);
71787190
var github = __webpack_require__(469);
7191+
var VERSION = __webpack_require__(52);
71797192
var context = github.context;
71807193
var isTrue = function (variable) {
71817194
var lowercase = variable.toLowerCase();
@@ -7220,7 +7233,7 @@ var buildExec = function () {
72207233
var filepath = workingDir ?
72217234
workingDir + '/codecov.sh' : 'codecov.sh';
72227235
var execArgs = [filepath];
7223-
execArgs.push('-n', "" + name, '-F', "" + flags, '-Q', 'github-action');
7236+
execArgs.push('-n', "" + name, '-F', "" + flags, '-Q', "github-action-" + VERSION);
72247237
var options = {};
72257238
options.env = Object.assign(process.env, {
72267239
GITHUB_ACTION: process.env.GITHUB_ACTION,

src/buildExec.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import buildExec from './buildExec';
22
const github = require('@actions/github');
3+
4+
const VERSION = require('./version');
5+
36
const context = github.context;
47

58
test('no arguments', () => {
@@ -12,7 +15,7 @@ test('no arguments', () => {
1215
'-F',
1316
'',
1417
'-Q',
15-
'github-action',
18+
`github-action-${VERSION}`,
1619
];
1720
if (context.eventName == 'pull_request') {
1821
args.push('-C', `${context.payload.pull_request.head.sha}`);
@@ -70,7 +73,7 @@ test('all arguments', () => {
7073
'-F',
7174
'test',
7275
'-Q',
73-
'github-action',
76+
`github-action-${VERSION}`,
7477
'-c',
7578
'-N',
7679
'83231650328f11695dfb754ca0f540516f188d27',

src/buildExec.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
const core = require('@actions/core');
22
const github = require('@actions/github');
33

4+
const VERSION = require('./version');
5+
46
const context = github.context;
57

68
const isTrue = (variable) => {
@@ -51,7 +53,14 @@ const buildExec = () => {
5153
workingDir + '/codecov.sh' : 'codecov.sh';
5254

5355
const execArgs = [filepath];
54-
execArgs.push( '-n', `${name}`, '-F', `${flags}`, '-Q', 'github-action' );
56+
execArgs.push(
57+
'-n',
58+
`${name}`,
59+
'-F',
60+
`${flags}`,
61+
'-Q',
62+
`github-action-${VERSION}`,
63+
);
5564

5665
const options:any = {};
5766
options.env = Object.assign(process.env, {

src/version.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const VERSION = 'v1.5.0';
2+
3+
export default VERSION;

0 commit comments

Comments
 (0)