mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
Merge pull request #365 from codecov/pull-version-from-package
refactor: Pull version from package.json
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import buildExec from './buildExec';
|
||||
const github = require('@actions/github');
|
||||
|
||||
import VERSION from './version';
|
||||
const pjson = require('../package.json');
|
||||
|
||||
const context = github.context;
|
||||
|
||||
@@ -15,7 +15,7 @@ test('no arguments', () => {
|
||||
'-F',
|
||||
'',
|
||||
'-Q',
|
||||
`github-action-${VERSION}`,
|
||||
`github-action-${pjson.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-${VERSION}`,
|
||||
`github-action-${pjson.version}`,
|
||||
'-c',
|
||||
'-N',
|
||||
'83231650328f11695dfb754ca0f540516f188d27',
|
||||
|
||||
Reference in New Issue
Block a user