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

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: codecov/codecov-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.0
Choose a base ref
...
head repository: codecov/codecov-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.1
Choose a head ref
  • 5 commits
  • 6 files changed
  • 4 contributors

Commits on Nov 30, 2017

  1. update to use upload/v4 endpoint

    The `Content-Type` of `plain/text` was a mistake in v3. Fixed in v4.
    Steve Peak authored Nov 30, 2017

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b03a202 View commit details

Commits on Feb 13, 2018

  1. Copy the full SHA
    19facba View commit details

Commits on Feb 14, 2018

  1. add -X s3 to disable uploading to s3 (#84)

    Steve Peak authored and eddiemoore committed Feb 14, 2018
    Copy the full SHA
    4a7561e View commit details

Commits on Apr 26, 2018

  1. Copy the full SHA
    75cc0dd View commit details

Commits on Apr 27, 2018

  1. v3.0.1 (#96)

    * v3.0.1
    
    * Fix tests
    eddiemoore authored Apr 27, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e903e88 View commit details
Showing with 1,437 additions and 144 deletions.
  1. +0 −1 .travis.yml
  2. +0 −1 appveyor.yml
  3. +26 −20 lib/codecov.js
  4. +1,265 −0 package-lock.json
  5. +2 −2 package.json
  6. +144 −120 test/index.js
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ node_js:
- "6"
- "5"
- "4"
- "iojs"

after_success:
- ./bin/codecov -e TRAVIS_NODE_VERSION -f coverage/coverage.json
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@ environment:
- nodejs_version: "6"
- nodejs_version: "5"
- nodejs_version: "4"
- nodejs_version: "1.0"

max_jobs: 4

46 changes: 26 additions & 20 deletions lib/codecov.js
Original file line number Diff line number Diff line change
@@ -167,7 +167,7 @@ var sendToCodecovV3 = function(codecov_endpoint, query, upload_body, on_success,
// Direct to S3
request.post(
{
url : urlgrey(codecov_endpoint + '/upload/v3').query(query).toString(),
url : urlgrey(codecov_endpoint + '/upload/v4').query(query).toString(),
body : '',
headers : {
'Content-Type': 'text/plain',
@@ -184,7 +184,7 @@ var sendToCodecovV3 = function(codecov_endpoint, query, upload_body, on_success,
url : result.split('\n')[1],
body : upload_body,
headers : {
'Content-Type': 'plain/text',
'Content-Type': 'text/plain',
'x-amz-acl': 'public-read'
}
}, function(err, response, result){
@@ -283,7 +283,7 @@ var upload = function(args, on_success, on_failure){
// List git files
var root = path.resolve(args.options.root || query.root || '.');
console.log('==> Building file structure');
upload += execSync('cd '+root+' && git ls-files || hg locate').toString().trim() + '\n<<<<<< network\n';
upload += execSync('git ls-files || hg locate', { cwd: root }).toString().trim() + '\n<<<<<< network\n';

// Make gcov reports
if ((args.options.disable || '').split(',').indexOf('gcov') === -1) {
@@ -318,9 +318,9 @@ var upload = function(args, on_success, on_failure){
// Detect .bowerrc
var bowerrc;
if(!isWindows) {
bowerrc = execSync('cd '+root+' && test -f .bowerrc && cat .bowerrc || echo ""').toString().trim();
bowerrc = execSync('test -f .bowerrc && cat .bowerrc || echo ""', { cwd: root }).toString().trim();
} else {
bowerrc = execSync('cd '+root+' && if exist .bowerrc type .bowerrc').toString().trim();
bowerrc = execSync('if exist .bowerrc type .bowerrc', { cwd: root }).toString().trim();
}
if (bowerrc) {
bowerrc = JSON.parse(bowerrc).directory;
@@ -382,21 +382,27 @@ var upload = function(args, on_success, on_failure){

} else {
console.log('==> Uploading reports');
sendToCodecovV3(codecov_endpoint, query, upload,
function(){
// remove files after Uploading
if (args.options.clear) {
for (var i = files.length - 1; i >= 0; i--) {
try {
fs.unlinkSync(files[i]);
} catch (e) {}
}
}
if (on_success) {
on_success.apply(this, arguments);
}
},
on_failure || function(){});
var _upload;
if ((args.options.disable || '').split(',').indexOf('s3') === -1) {
_upload = sendToCodecovV3;
} else {
_upload = sendToCodecovV2;
}
_upload(codecov_endpoint, query, upload,
function(){
// remove files after Uploading
if (args.options.clear) {
for (var i = files.length - 1; i >= 0; i--) {
try {
fs.unlinkSync(files[i]);
} catch (e) {}
}
}
if (on_success) {
on_success.apply(this, arguments);
}
},
on_failure || function(){});
}
}

Loading