Permalink
Browse files

[CB-4960] Update the URL to dynamically download RAT

  • Loading branch information...
1 parent 2ebe864 commit da633d44103fb0442c8a5674e6bb52aa28643a96 @cmarcelk cmarcelk committed Oct 1, 2013
Showing with 6 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +5 −3 coho
View
@@ -1,2 +1,3 @@
apache-rat-0.8
+apache-rat-0.10
node_modules
View
8 coho
@@ -1300,14 +1300,16 @@ function ratCommand() {
}
var repos = computeReposFromFlag(argv.r);
// Check that RAT command exists.
- var ratPath = path.resolve(path.join(path.dirname(process.argv[1]), 'apache-rat-0.8', 'apache-rat-0.8.jar'));
+ var ratName = 'apache-rat-0.10';
+ var ratUrl = "https://dist.apache.org/repos/dist/release/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz";
+ var ratPath = path.resolve(path.join(path.dirname(process.argv[1]), ratName, ratName+'.jar'));
if (!fs.existsSync(ratPath)) {
print('RAT tool not found, downloading to: ' + ratPath);
forEachRepo([getRepoById('coho')], function() {
if (shjs.which('curl')) {
- execHelper('curl "http://mirror.csclub.uwaterloo.ca/apache/incubator/rat/binaries/apache-rat-incubating-0.8-bin.tar.gz" | tar xz');
+ execHelper('curl "' + ratUrl + '" | tar xz');
} else {
- execHelper('wget -O - "http://mirror.csclub.uwaterloo.ca/apache/incubator/rat/binaries/apache-rat-incubating-0.8-bin.tar.gz" | tar xz');
+ execHelper('wget -O - "' + ratUrl + '" | tar xz');
}
});
if (!fs.existsSync(ratPath)) {

0 comments on commit da633d4

Please sign in to comment.