Skip to content

Commit e14fdae

Browse files
Merge branch 'master' into fix/ts-check
2 parents b6b7666 + ef4a6ea commit e14fdae

20 files changed

+373
-159
lines changed

.circleci/config.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
# Download and cache dependencies
2727
- restore_cache:
2828
keys:
29-
- v1-dependencies-{{ checksum "npm-shrinkwrap.json" }}
29+
- v2-dependencies-{{ checksum "npm-shrinkwrap.json" }}
3030

3131
- run: npm install
3232

3333
- save_cache:
3434
paths:
3535
- node_modules
36-
key: v1-dependencies-{{ checksum "npm-shrinkwrap.json" }}
36+
key: v2-dependencies-{{ checksum "npm-shrinkwrap.json" }}
3737

3838
# run tests!
3939
- run: make test
@@ -133,7 +133,7 @@ jobs:
133133
- run:
134134
name: Run Alpine binary -f (dry run)
135135
command: |
136-
out/codecov-alpine -f /root/project/coverage-alpine/cobertura-coverage.xml -F alpine -d -Z -e CIRCLE_BRANCH >> output_alpine.txt
136+
NODE_DEBUG=vm out/codecov-alpine -f /root/project/coverage-alpine/cobertura-coverage.xml -F alpine -d -Z -e CIRCLE_BRANCH >> output_alpine.txt
137137
- run:
138138
name: Run Alpine binary auto-detect (dry run)
139139
command: |
@@ -143,6 +143,9 @@ jobs:
143143
command: |
144144
out/codecov-alpine -F alpine -Z -e CIRCLE_BRANCH
145145
146+
- store_artifacts:
147+
path: output_alpine.txt
148+
146149
- persist_to_workspace:
147150
root: .
148151
paths:
@@ -181,7 +184,7 @@ jobs:
181184
- run:
182185
name: Run Linux binary -f (dry run)
183186
command: |
184-
out/codecov-linux -f /home/circleci/project/coverage/cobertura-coverage.xml -F linux -d -Z -e CIRCLE_BRANCH >> output_linux.txt
187+
out/codecov-linux -f /home/circleci/project/coverage/cobertura-coverage.xml -F linux -d -Z -v -e CIRCLE_BRANCH >> output_linux.txt
185188
- run:
186189
name: Run Linux binary auto-detect (dry run)
187190
command: |
@@ -232,7 +235,7 @@ jobs:
232235
- run:
233236
name: Run MacOS binary -f (dry-run)
234237
command: |
235-
out/codecov-macos -f /Users/distiller/project/coverage/cobertura-coverage.xml -F macos -d -Z -e CIRCLE_BRANCH >> output_osx.txt
238+
out/codecov-macos -f /Users/distiller/project/coverage/cobertura-coverage.xml -F macos -d -Z -v -e CIRCLE_BRANCH >> output_osx.txt
236239
- run:
237240
name: Run MacOS binary auto-detect (dry-run)
238241
command: |
@@ -282,7 +285,7 @@ jobs:
282285
command: |
283286
dir C:\Users\circleci\project\coverage\
284287
attrib C:\Users\circleci\project\coverage\cobertura-coverage.xml
285-
.\out\codecov.exe -f C:\Users\circleci\project\coverage\cobertura-coverage.xml -F windows -d -Z -e CIRCLE_BRANCH >> output_win.txt
288+
.\out\codecov.exe -f C:\Users\circleci\project\coverage\cobertura-coverage.xml -F windows -d -Z -v -e CIRCLE_BRANCH >> output_win.txt
286289
shell: cmd.exe
287290
- run:
288291
name: Run Windows binary auto-detect (dry-run)

bin/codecov

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ var argv = require('yargs') // eslint-disable-line
106106
alias: 'Q',
107107
type: 'string',
108108
description: `Used internally by Codecov, this argument helps track wrappers
109-
of the uploader (e.g. GitHub Action, CircleCI Orb)`
109+
of the uploader (e.g. GitHub Action, CircleCI Orb)`,
110110
},
111111
})
112112
.version()

npm-shrinkwrap.json

Lines changed: 87 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"eslint-config-prettier": "8.3.0",
4646
"husky": "7.0.1",
4747
"jest": "27.0.6",
48-
"lint-staged": "11.0.1",
48+
"lint-staged": "11.1.0",
4949
"nock": "13.1.1",
5050
"pkg": "5.1.0",
5151
"prettier": "2.3.2",

src/ci_providers/provider_azurepipelines.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const childProcess = require('child_process')
2-
const { log } = require('../helpers/logger')
2+
const { error, info, verbose } = require('../helpers/logger')
33

44
function detect(envs) {
55
return !!envs.SYSTEM_TEAMFOUNDATIONSERVERURI
@@ -63,7 +63,7 @@ function _getSHA(inputs) {
6363
.trimRight()
6464
if (mergeCommitRegex.exec(mergeCommitMessage)) {
6565
const mergeCommit = mergeCommitMessage.split(' ')[1]
66-
log(` Fixing merge commit SHA ${commit} -> ${mergeCommit}`)
66+
info(` Fixing merge commit SHA ${commit} -> ${mergeCommit}`)
6767
commit = mergeCommit
6868
}
6969
}

src/ci_providers/provider_githubactions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const childProcess = require('child_process')
2-
const { log } = require('../helpers/logger')
2+
const { error, info, verbose } = require('../helpers/logger')
33

44
function detect(envs) {
55
return envs.GITHUB_ACTIONS
@@ -70,10 +70,10 @@ function _getSHA(inputs) {
7070
.trimRight()
7171
if (mergeCommitRegex.exec(mergeCommitMessage)) {
7272
const mergeCommit = mergeCommitMessage.split(' ')[1]
73-
log(` Fixing merge commit SHA ${commit} -> ${mergeCommit}`)
73+
info(` Fixing merge commit SHA ${commit} -> ${mergeCommit}`)
7474
commit = mergeCommit
7575
} else if (mergeCommitMessage === '') {
76-
log(
76+
info(
7777
'-> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0',
7878
)
7979
}

src/ci_providers/provider_local.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const childprocess = require('child_process')
22
const { parseSlug } = require('../helpers/git')
3+
const { logAndThrow } = require('../helpers/util')
34

45
function detect(envs) {
56
return !envs.CI
@@ -27,9 +28,7 @@ function _getBranch(inputs) {
2728
.trimRight()
2829
return branchName
2930
} catch (error) {
30-
throw new Error(
31-
`There was an error getting the branch name from git: ${error}`,
32-
)
31+
logAndThrow(`There was an error getting the branch name from git: ${error}`)
3332
}
3433
}
3534

@@ -66,9 +65,7 @@ function _getSHA(inputs) {
6665
.trimRight()
6766
return sha
6867
} catch (error) {
69-
throw new Error(
70-
`There was an error getting the commit SHA from git: ${error}`,
71-
)
68+
logAndThrow(`There was an error getting the commit SHA from git: ${error}`)
7269
}
7370
}
7471

@@ -84,7 +81,7 @@ function _getSlug(inputs) {
8481
.trimRight()
8582
return parseSlug(slug)
8683
} catch (error) {
87-
throw new Error(`There was an error getting the slug from git: ${error}`)
84+
logAndThrow(`There was an error getting the slug from git: ${error}`)
8885
}
8986
}
9087

0 commit comments

Comments
 (0)