You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/05/28 21:31:17 UTC
[1/2] git commit: Add running RAT to coho tool.
Updated Branches:
refs/heads/master 9d6e1f504 -> 7ba4c8c86
Add running RAT to coho tool.
Tested only for iOS, so exclusion filters need updating for other repos.
Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/07e025e9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/07e025e9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/07e025e9
Branch: refs/heads/master
Commit: 07e025e9fa94ec2bceb303eaf7865d6c14e8b30c
Parents: 9d6e1f5
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue May 28 15:30:23 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue May 28 15:30:23 2013 -0400
----------------------------------------------------------------------
coho | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/07e025e9/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index 5a84c1c..585e98e 100755
--- a/coho
+++ b/coho
@@ -25,6 +25,15 @@ var shjs = require('shelljs');
var origWorkingDir = process.cwd();
+var COMMON_RAT_FLAGS = ['-e "*.wav"',
+ '-e "*.webloc"',
+ '-e "*jasmine-1.2.0*"',
+ '-e "*.xcodeproj"',
+ '-e ".*"',
+ '-e "*-Info.plist"',
+ '-e "VERSION"'
+ ];
+
var platformRepos = [
{
title: 'Android',
@@ -741,6 +750,39 @@ function tagReleaseBranchCommand(argv) {
});
}
+function ratCommand() {
+ var opt = registerRepoFlag(optimist);
+ opt = registerHelpFlag(opt);
+ opt.usage('Uses Apache RAT to audit source files for license headers.\n' +
+ '\n' +
+ 'Usage: $0 audit-license-headers --repo=ios')
+ argv = opt.argv;
+
+ if (argv.h) {
+ optimist.showHelp();
+ process.exit(1);
+ }
+ var repos = computeReposFromFlag(argv);
+ // 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'));
+ if (!fs.existsSync(ratPath)) {
+ console.log('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');
+ } else {
+ execHelper('wget -O - "http://mirror.csclub.uwaterloo.ca/apache/incubator/rat/binaries/apache-rat-incubating-0.8-bin.tar.gz" | tar xz');
+ }
+ });
+ if (!fs.existsSync(ratPath)) {
+ fatal('Download failed.');
+ }
+ }
+ forEachRepo(repos, function(repo) {
+ execHelper('java -jar "' + ratPath + '" -d . ' + COMMON_RAT_FLAGS.join(' '));
+ });
+}
+
function main() {
var commandList = [
{
@@ -764,6 +806,10 @@ function main() {
desc: 'Tags repos for a release.',
entryPoint: tagReleaseBranchCommand
}, {
+ name: 'audit-license-headers',
+ desc: 'Uses Apache RAT to look for missing license headers.',
+ entryPoint: ratCommand
+ }, {
name: 'create-release-snapshot',
desc: 'Creates a signed .zip that consitutes a release.',
entryPoint: createReleaseCommand
[2/2] git commit: Add a .gitignore for coho
Posted by ag...@apache.org.
Add a .gitignore for coho
Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/7ba4c8c8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/7ba4c8c8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/7ba4c8c8
Branch: refs/heads/master
Commit: 7ba4c8c86560ac66570cb6b60b7cbba7a6caf402
Parents: 07e025e
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue May 28 15:31:07 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue May 28 15:31:07 2013 -0400
----------------------------------------------------------------------
.gitignore | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/7ba4c8c8/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..98c049a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+apache-rat-0.8
+node_modules