mirror of
https://github.com/codecov/codecov-action.git
synced 2026-04-06 14:39:25 +00:00
Destructure package.json for version
This commit is contained in:
parent
d1f4b0126d
commit
33974f67c6
3 changed files with 8 additions and 8 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import buildExec from './buildExec';
|
||||
const github = require('@actions/github');
|
||||
|
||||
const pjson = require('../package.json');
|
||||
const { version } = require('../package.json');
|
||||
|
||||
const context = github.context;
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ test('no arguments', () => {
|
|||
'-F',
|
||||
'',
|
||||
'-Q',
|
||||
`github-action-${pjson.version}`,
|
||||
`github-action-${version}`,
|
||||
];
|
||||
if (context.eventName == 'pull_request') {
|
||||
args.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||
|
|
@ -72,7 +72,7 @@ test('all arguments', () => {
|
|||
'-F',
|
||||
'test',
|
||||
'-Q',
|
||||
`github-action-${pjson.version}`,
|
||||
`github-action-${version}`,
|
||||
'-c',
|
||||
'-N',
|
||||
'83231650328f11695dfb754ca0f540516f188d27',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
const core = require('@actions/core');
|
||||
const github = require('@actions/github');
|
||||
|
||||
const pjson = require('../package.json');
|
||||
const { version } = require('../package.json');
|
||||
|
||||
const context = github.context;
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ const buildExec = () => {
|
|||
'-F',
|
||||
`${flags}`,
|
||||
'-Q',
|
||||
`github-action-${pjson.version}`,
|
||||
`github-action-${version}`,
|
||||
);
|
||||
|
||||
const options:any = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue