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

Commit

Permalink
Merge lastest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ralic committed Feb 4, 2020
2 parents 36bbef4 + bac0787 commit e138efe
Show file tree
Hide file tree
Showing 9 changed files with 609 additions and 417 deletions.
6 changes: 6 additions & 0 deletions .dependabot/config.yml
@@ -0,0 +1,6 @@
version: 1

update_configs:
- package_manager: 'javascript'
directory: '/'
update_schedule: 'live'
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -29,7 +29,7 @@ This script ( `bin/codecov` ) detect your CI provider and all coverage reports a

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

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/).
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/).

#### Upload repo tokens

Expand Down Expand Up @@ -107,3 +107,6 @@ nyc report --reporter=text-lcov > coverage.lcov
- v3.5.0 Added TeamCity support
- v3.6.0 Added AWS CodeBuild and Semaphore2
- v3.6.1 Fix for Semaphore
- v3.6.2 Command line args sanitized fix
- v3.6.3 Fix for AWS Codebuild & package updates
- v3.6.4 Fix Cirrus CI
5 changes: 3 additions & 2 deletions lib/codecov.js
Expand Up @@ -5,6 +5,7 @@ var urlgrey = require('urlgrey')
var jsYaml = require('js-yaml')
var walk = require('ignore-walk')
var execSync = require('child_process').execSync
var validator = require('validator')

var detectProvider = require('./detect')

Expand Down Expand Up @@ -397,9 +398,9 @@ var upload = function(args, on_success, on_failure) {
" -type f -name '*.gcno' " +
gcg +
' -exec ' +
(args.options['gcov-exec'] || 'gcov') +
(validator.escape(args.options['gcov-exec']) || 'gcov') +
' ' +
(args.options['gcov-args'] || '') +
(validator.escape(args.options['gcov-args']) || '') +
' {} +'
} else {
// @TODO support for root
Expand Down
2 changes: 1 addition & 1 deletion lib/services/cirrus.js
Expand Up @@ -5,7 +5,7 @@ module.exports = {
configuration: function() {
console.log(' Cirrus CI Detected')
return {
service: 'cirrusci',
service: 'cirrus-ci',
build: process.env.CIRRUS_BUILD_ID,
job: process.env.CIRRUS_TASK_ID,
commit: process.env.CIRRUS_CHANGE_IN_REPO,
Expand Down
8 changes: 5 additions & 3 deletions lib/services/codebuild.js
@@ -1,3 +1,5 @@
var git = require('../git.js')

module.exports = {
detect: function() {
return !!process.env.CODEBUILD_CI
Expand All @@ -21,13 +23,13 @@ module.exports = {
''
)
}
throw new Error('Cannot detect branch name.')
return git.branch()
}
function detectPRNumber() {
if (process.env.CODEBUILD_SOURCE_VERSION) {
if (process.env.CODEBUILD_WEBHOOK_HEAD_REF) {
return process.env.CODEBUILD_SOURCE_VERSION.replace(/^pr\//, '')
}
throw new Error('Cannot detect PR number.')
return undefined
}
function detectRepoSlug() {
if (process.env.CODEBUILD_SOURCE_REPO_URL) {
Expand Down

0 comments on commit e138efe

Please sign in to comment.