Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit e138efe

Browse files
committed
Merge lastest changes
2 parents 36bbef4 + bac0787 commit e138efe

File tree

9 files changed

+609
-417
lines changed

9 files changed

+609
-417
lines changed

.dependabot/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 1
2+
3+
update_configs:
4+
- package_manager: 'javascript'
5+
directory: '/'
6+
update_schedule: 'live'

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This script ( `bin/codecov` ) detect your CI provider and all coverage reports a
2929

3030
Once your app is instrumented for coverage, and building, simply call `./node_modules/.bin/codecov`.
3131

32-
This library currently supports the following CI companies: [Travis CI](https://travis-ci.org/), [Travis](https://travis-ci.com/), [Appveyor](https://appveyor.com/), [CircleCI](https://circleci.com/), [Cirrus CI](https://cirrus-ci.org/), [Codeship](https://codeship.io/), [Drone](https://drone.io/), [Jenkins](http://jenkins-ci.org/), [Shippable](https://shippable.com/), [Semaphore](https://semaphoreapp.com/), [Wercker](https://wercker.com/), [Snap CI](https://snap-ci.com/), [Buildkite](https://buildkite.com/).
32+
This library currently supports the following CI companies: [Travis CI](https://travis-ci.org/), [Travis](https://travis-ci.com/), [Appveyor](https://appveyor.com/), [CircleCI](https://circleci.com/), [Cirrus CI](https://cirrus-ci.org/), [Codeship](https://codeship.io/), [Drone](https://drone.io/), [Jenkins](http://jenkins-ci.org/), [Shippable](https://shippable.com/), [Semaphore](https://semaphoreapp.com/), [Wercker](https://wercker.com/), [Snap CI](https://snap-ci.com/), [Buildkite](https://buildkite.com/), [AWS CodeBuild](https://aws.amazon.com/codebuild/).
3333

3434
#### Upload repo tokens
3535

@@ -107,3 +107,6 @@ nyc report --reporter=text-lcov > coverage.lcov
107107
- v3.5.0 Added TeamCity support
108108
- v3.6.0 Added AWS CodeBuild and Semaphore2
109109
- v3.6.1 Fix for Semaphore
110+
- v3.6.2 Command line args sanitized fix
111+
- v3.6.3 Fix for AWS Codebuild & package updates
112+
- v3.6.4 Fix Cirrus CI

lib/codecov.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var urlgrey = require('urlgrey')
55
var jsYaml = require('js-yaml')
66
var walk = require('ignore-walk')
77
var execSync = require('child_process').execSync
8+
var validator = require('validator')
89

910
var detectProvider = require('./detect')
1011

@@ -397,9 +398,9 @@ var upload = function(args, on_success, on_failure) {
397398
" -type f -name '*.gcno' " +
398399
gcg +
399400
' -exec ' +
400-
(args.options['gcov-exec'] || 'gcov') +
401+
(validator.escape(args.options['gcov-exec']) || 'gcov') +
401402
' ' +
402-
(args.options['gcov-args'] || '') +
403+
(validator.escape(args.options['gcov-args']) || '') +
403404
' {} +'
404405
} else {
405406
// @TODO support for root

lib/services/cirrus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
configuration: function() {
66
console.log(' Cirrus CI Detected')
77
return {
8-
service: 'cirrusci',
8+
service: 'cirrus-ci',
99
build: process.env.CIRRUS_BUILD_ID,
1010
job: process.env.CIRRUS_TASK_ID,
1111
commit: process.env.CIRRUS_CHANGE_IN_REPO,

lib/services/codebuild.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
var git = require('../git.js')
2+
13
module.exports = {
24
detect: function() {
35
return !!process.env.CODEBUILD_CI
@@ -21,13 +23,13 @@ module.exports = {
2123
''
2224
)
2325
}
24-
throw new Error('Cannot detect branch name.')
26+
return git.branch()
2527
}
2628
function detectPRNumber() {
27-
if (process.env.CODEBUILD_SOURCE_VERSION) {
29+
if (process.env.CODEBUILD_WEBHOOK_HEAD_REF) {
2830
return process.env.CODEBUILD_SOURCE_VERSION.replace(/^pr\//, '')
2931
}
30-
throw new Error('Cannot detect PR number.')
32+
return undefined
3133
}
3234
function detectRepoSlug() {
3335
if (process.env.CODEBUILD_SOURCE_REPO_URL) {

0 commit comments

Comments
 (0)