mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-13 06:27:26 +00:00
feat: source version from package.json
This commit is contained in:
parent
29386c70ef
commit
90d04dbbe6
4 changed files with 9 additions and 8 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import buildExec from './buildExec';
|
import buildExec from './buildExec';
|
||||||
const github = require('@actions/github');
|
const github = require('@actions/github');
|
||||||
|
|
||||||
import VERSION from './version';
|
import { version } from './version';
|
||||||
|
|
||||||
const context = github.context;
|
const context = github.context;
|
||||||
|
|
||||||
|
|
@ -15,7 +15,7 @@ test('no arguments', () => {
|
||||||
'-F',
|
'-F',
|
||||||
'',
|
'',
|
||||||
'-Q',
|
'-Q',
|
||||||
`github-action-${VERSION}`,
|
`github-action-${version}`,
|
||||||
];
|
];
|
||||||
if (context.eventName == 'pull_request') {
|
if (context.eventName == 'pull_request') {
|
||||||
args.push('-C', `${context.payload.pull_request.head.sha}`);
|
args.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||||
|
|
@ -73,7 +73,7 @@ test('all arguments', () => {
|
||||||
'-F',
|
'-F',
|
||||||
'test',
|
'test',
|
||||||
'-Q',
|
'-Q',
|
||||||
`github-action-${VERSION}`,
|
`github-action-${version}`,
|
||||||
'-c',
|
'-c',
|
||||||
'-N',
|
'-N',
|
||||||
'83231650328f11695dfb754ca0f540516f188d27',
|
'83231650328f11695dfb754ca0f540516f188d27',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
const github = require('@actions/github');
|
const github = require('@actions/github');
|
||||||
|
|
||||||
import VERSION from './version';
|
import { version } from './version';
|
||||||
|
|
||||||
const context = github.context;
|
const context = github.context;
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ const buildExec = () => {
|
||||||
'-F',
|
'-F',
|
||||||
`${flags}`,
|
`${flags}`,
|
||||||
'-Q',
|
'-Q',
|
||||||
`github-action-${VERSION}`,
|
`github-action-${version}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
const options:any = {};
|
const options:any = {};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
const VERSION = 'v1.5.2';
|
export { version } from '../package.json';
|
||||||
|
|
||||||
export default VERSION;
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
{
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"resolveJsonModule": true
|
||||||
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src"
|
"src"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue