From b8f68524afdfa99b19eb050a7facfe1341594954 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 8 Jun 2021 11:33:55 -0400 Subject: [PATCH] lint --- dist/index.js | 15 ++++++++++++++- src/buildExec.test.ts | 7 +++++-- src/buildExec.ts | 11 ++++++++++- src/version.ts | 3 +++ 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 src/version.ts diff --git a/dist/index.js b/dist/index.js index 10b985872..2b919703c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1101,6 +1101,18 @@ function onceStrict (fn) { } +/***/ }), + +/***/ 52: +/***/ (function(__unusedmodule, exports) { + +"use strict"; + +exports.__esModule = true; +var VERSION = 'v1.5.0'; +exports["default"] = VERSION; + + /***/ }), /***/ 82: @@ -7176,6 +7188,7 @@ exports.checkBypass = checkBypass; exports.__esModule = true; var core = __webpack_require__(470); var github = __webpack_require__(469); +var VERSION = __webpack_require__(52); var context = github.context; var isTrue = function (variable) { var lowercase = variable.toLowerCase(); @@ -7220,7 +7233,7 @@ var buildExec = function () { var filepath = workingDir ? workingDir + '/codecov.sh' : 'codecov.sh'; var execArgs = [filepath]; - execArgs.push('-n', "" + name, '-F', "" + flags, '-Q', 'github-action-1.5.1'); + execArgs.push('-n', "" + name, '-F', "" + flags, '-Q', "github-action-" + VERSION); var options = {}; options.env = Object.assign(process.env, { GITHUB_ACTION: process.env.GITHUB_ACTION, diff --git a/src/buildExec.test.ts b/src/buildExec.test.ts index 29587906f..d2241fbe5 100644 --- a/src/buildExec.test.ts +++ b/src/buildExec.test.ts @@ -1,5 +1,8 @@ import buildExec from './buildExec'; const github = require('@actions/github'); + +const VERSION = require('./version'); + const context = github.context; test('no arguments', () => { @@ -12,7 +15,7 @@ test('no arguments', () => { '-F', '', '-Q', - 'github-action', + `github-action-${VERSION}`, ]; if (context.eventName == 'pull_request') { args.push('-C', `${context.payload.pull_request.head.sha}`); @@ -70,7 +73,7 @@ test('all arguments', () => { '-F', 'test', '-Q', - 'github-action', + `github-action-${VERSION}`, '-c', '-N', '83231650328f11695dfb754ca0f540516f188d27', diff --git a/src/buildExec.ts b/src/buildExec.ts index d9fcb99d8..a3a2b79a4 100644 --- a/src/buildExec.ts +++ b/src/buildExec.ts @@ -1,6 +1,8 @@ const core = require('@actions/core'); const github = require('@actions/github'); +const VERSION = require('./version'); + const context = github.context; const isTrue = (variable) => { @@ -51,7 +53,14 @@ const buildExec = () => { workingDir + '/codecov.sh' : 'codecov.sh'; const execArgs = [filepath]; - execArgs.push( '-n', `${name}`, '-F', `${flags}`, '-Q', 'github-action-1.5.1' ); + execArgs.push( + '-n', + `${name}`, + '-F', + `${flags}`, + '-Q', + `github-action-${VERSION}`, + ); const options:any = {}; options.env = Object.assign(process.env, { diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 000000000..4b1f1548f --- /dev/null +++ b/src/version.ts @@ -0,0 +1,3 @@ +const VERSION = 'v1.5.0'; + +export default VERSION;