Skip to content

Commit

Permalink
Remove tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed May 18, 2016
1 parent c0f3b9e commit 9094196
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 87 deletions.
9 changes: 1 addition & 8 deletions lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ var util = require('./util'),
sequence = require('when/sequence'),
GitHubApi = require('github'),
repoPathParse = require('repo-path-parse'),
log = require('./log'),
tracker = require('./tracker');
log = require('./log');

var noop = when.resolve(true),
commitRefRe = /#.+$/,
Expand Down Expand Up @@ -79,7 +78,6 @@ function stageDir(baseDir) {
}

function status() {
tracker._track('git', 'status');
return run(
'!git',
'status --short --untracked-files=no'
Expand All @@ -90,7 +88,6 @@ function status() {
}

function commit(path, message, version) {
tracker._track('git', 'commit');
return run(
'git',
'commit',
Expand All @@ -104,7 +101,6 @@ function commit(path, message, version) {
}

function tag(version, tag, annotation) {
tracker._track('git', 'tag');
return run(
'git',
'tag',
Expand All @@ -128,7 +124,6 @@ function getLatestTag() {
}

function push(remoteUrl, pushUrl) {
tracker._track('git', 'push');
var repository = pushUrl || '';
return run('git', 'push', repository).catch(function(err) {
log.error('Please make sure an upstream remote repository is configured for the current branch. Example commands:\n' +
Expand All @@ -139,7 +134,6 @@ function push(remoteUrl, pushUrl) {
}

function pushTags(version, pushUrl) {
tracker._track('git', 'push-tags');
var repository = pushUrl || '';
return run(
'git',
Expand Down Expand Up @@ -199,7 +193,6 @@ function getChangelog(options) {
}

function release(options, remoteUrl) {
//tracker._track('git', 'release');

var repo = repoPathParse(remoteUrl);

Expand Down
50 changes: 23 additions & 27 deletions lib/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,49 @@ var cli = require('./cli'),
log = require('./log'),
config = require('./config'),
tasks = require('./tasks'),
tracker = require('./tracker');
when = require('when'),
noop = when.resolve(true);

function fromCli(options) {
function fromCli(options) {
return execute(cli.parse(options));
}

function execute(cliArgs) {

var options = config.mergeOptions(cliArgs);

return tracker.askPermissionAndTrack(options).then(function() {
if(cliArgs.version) {

if(cliArgs.version) {
cli.version();

cli.version();
tracker._track('version');
} else if(cliArgs.help) {

} else if(cliArgs.help) {
cli.help();

cli.help();
tracker._track('help');
} else {

} else {

if(options.force) {
log.warn('Using --force, I sure hope you know what you are doing.');
}

if(options.debug) {
require('when/monitor/console');
}
if(options.force) {
log.warn('Using --force, I sure hope you know what you are doing.');
}

log.debugDir(options);
if(options.debug) {
require('when/monitor/console');
}

return tasks.run(options);
log.debugDir(options);

}
return tasks.run(options).catch(function(error) {

}).catch(function(error) {
log.error(error);

log.error(error);
if(options.debug) {
throw error;
}

if(options.debug) {
throw error;
}
});
}

});
return noop;
}

module.exports = {
Expand Down
5 changes: 1 addition & 4 deletions lib/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ var path = require('path'),
when = require('when'),
sequence = require('when/sequence'),
fn = require('when/node'),
noop = when.resolve(true),
tracker = require('./tracker');
noop = when.resolve(true);

var forcedCmdRe = /^!/;

Expand Down Expand Up @@ -79,14 +78,12 @@ function mkCleanDir(dir) {
}

function build(command) {
tracker._track('npm', 'run-script');
return command ? run(command) : noop.then(function() {
log.verbose('No build command was provided.');
});
}

function npmPublish(path, tag) {
tracker._track('npm', 'publish');
var publishPath = path || '.';
return run('npm', 'publish', publishPath, '--tag', tag);
}
Expand Down
47 changes: 0 additions & 47 deletions lib/tracker.js

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"glob": "^7.0.3",
"graceful-fs": "^4.1.3",
"inquirer": "^1.0.2",
"insight": "^0.8.2",
"lodash": "^4.6.1",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
Expand Down

0 comments on commit 9094196

Please sign in to comment.