Skip to content

Commit

Permalink
adding test watch
Browse files Browse the repository at this point in the history
  • Loading branch information
machellerogden committed Feb 26, 2017
1 parent 8614f2f commit d8cdbb1
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 2 deletions.
102 changes: 102 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
## Change Log

### upcoming (2017/02/26 20:38 +00:00)
- [8614f2f](https://github.com/carsdotcom/bitcar/commit/8614f2f04e863d25523338fc24efdfd015d6c1b9) more tests (@machellerogden)
- [6cf9aa3](https://github.com/carsdotcom/bitcar/commit/6cf9aa3ac95f76539c3804d9ff9b7dda18b6d0d2) adding tests (@machellerogden)

### v1.4.0 (2017/02/24 17:31 +00:00)
- [bdce78b](https://github.com/carsdotcom/bitcar/commit/bdce78bba711461f8ed00aa6aa76d12fccacdd61) 1.4.0 (@machellerogden)
- [df75af5](https://github.com/carsdotcom/bitcar/commit/df75af5a4c2ef73371dc5e12aa16c5a4978eeb64) adding a force-latest option (@machellerogden)

### v1.3.1 (2017/02/24 17:09 +00:00)
- [ad4708c](https://github.com/carsdotcom/bitcar/commit/ad4708c44eebe3af1ca477fb7eb5573ddeaf0577) 1.3.1 (@machellerogden)
- [09ec1fd](https://github.com/carsdotcom/bitcar/commit/09ec1fdbcf2ae95e48ae1f1e4df0928acc00de29) clone all now sets target properly (@machellerogden)

### v1.3.0 (2017/02/24 16:46 +00:00)
- [4b60f50](https://github.com/carsdotcom/bitcar/commit/4b60f503dcacf153a963569987b03ceb6c4252e3) 1.3.0 (@machellerogden)
- [866e08c](https://github.com/carsdotcom/bitcar/commit/866e08cace087cdf3583d520d1756520177d2e01) adding a clone-all option (@machellerogden)
- [0ad5c46](https://github.com/carsdotcom/bitcar/commit/0ad5c4603062057c306a06148c726d5500502673) restructuring and adding lots of dev tooling (@machellerogden)

### v1.2.0 (2017/02/21 22:55 +00:00)
- [bf4e694](https://github.com/carsdotcom/bitcar/commit/bf4e694291a5a5c4c3db38458b623e3215b079ba) 1.2.0 (@machellerogden)
- [600fa1f](https://github.com/carsdotcom/bitcar/commit/600fa1f8df86342916749060e6a262faff0e4940) experimental zsh support - still no completions (@machellerogden)
- [92994c1](https://github.com/carsdotcom/bitcar/commit/92994c1bdd7b0210ec99c3d2ede4daa5da516eba) more generic script for better zsh support (@machellerogden)

### v1.1.4 (2017/02/20 15:46 +00:00)
- [f932657](https://github.com/carsdotcom/bitcar/commit/f9326578575453821d0eec32082536c3771ce117) 1.1.4 (@machellerogden)
- [acfa1cb](https://github.com/carsdotcom/bitcar/commit/acfa1cbc44dd89486b42f8fb76fb235d98235289) making bitbucket server support more generic (@machellerogden)
- [71d1679](https://github.com/carsdotcom/bitcar/commit/71d1679ae872ff5927a3744ce822bac3efda24cc) moving cache to dotfiles (@machellerogden)

### v1.1.3 (2017/02/15 23:11 +00:00)
- [71c11c6](https://github.com/carsdotcom/bitcar/commit/71c11c6ff1f252ce439efb5068cdcdbd1c311523) 1.1.3 (@machellerogden)
- [e8f2f24](https://github.com/carsdotcom/bitcar/commit/e8f2f24abeca1c0d66dd82b43f4863c6d66683d6) adding some short options and clarifying readme (@machellerogden)

### v1.1.2 (2017/02/14 21:21 +00:00)
- [e9a68da](https://github.com/carsdotcom/bitcar/commit/e9a68da6bf2b3ec9dd4457aac216ad978a8f36ed) 1.1.2 (@machellerogden)
- [65f7baa](https://github.com/carsdotcom/bitcar/commit/65f7baaae2798b64103edb7f4943ec2683888f71) big fixes (@machellerogden)

### v1.1.1 (2017/02/14 20:34 +00:00)
- [9d98977](https://github.com/carsdotcom/bitcar/commit/9d9897708ed6baca7cd774eff13daadc099873d3) 1.1.1 (@machellerogden)
- [181987e](https://github.com/carsdotcom/bitcar/commit/181987e1a7b846e3975cd805283492584992533a) fixing some things i missed (@machellerogden)

### v1.1.0 (2017/02/14 20:28 +00:00)
- [14120df](https://github.com/carsdotcom/bitcar/commit/14120dfaec7f2ec047234eb78e646c3817e51ded) 1.1.0 (@machellerogden)
- [e1ab369](https://github.com/carsdotcom/bitcar/commit/e1ab369a0591d84ed4f854eccf8916a4b670f78b) fixing up default github usernames and updating readme with info about github access token (@machellerogden)
- [843cfcd](https://github.com/carsdotcom/bitcar/commit/843cfcd753d1d92a944a5775825c0c1a47cb61e4) fixed private github access (@machellerogden)
- [b62e0df](https://github.com/carsdotcom/bitcar/commit/b62e0dfadc791204ffc6f1e4134f974f3131e24f) adding limit of 100 for now until i can sort out pagination (@machellerogden)
- [b80296d](https://github.com/carsdotcom/bitcar/commit/b80296d588c018fe39571b2ebba9f317705b6275) adding private access key for github (@machellerogden)

### v1.0.12 (2017/02/13 16:24 +00:00)
- [251671a](https://github.com/carsdotcom/bitcar/commit/251671ae8c73faf7a8b83cee2d3ce9091972dc49) 1.0.12 (@machellerogden)
- [cb1474e](https://github.com/carsdotcom/bitcar/commit/cb1474ecee33a83bf3bcc371584de59e62e94931) fixing open current repo (@machellerogden)

### v1.0.11 (2017/02/13 15:28 +00:00)
- [eafffe3](https://github.com/carsdotcom/bitcar/commit/eafffe33591d3608d792ec1ac44654a94244c1c7) 1.0.11 (@machellerogden)
- [3132dc7](https://github.com/carsdotcom/bitcar/commit/3132dc734fb754cd0346a90eef357d7580404bdf) better autocomplete (@machellerogden)

### v1.0.10 (2017/02/10 21:39 +00:00)
- [49c40f6](https://github.com/carsdotcom/bitcar/commit/49c40f6854ec6560b9a48b070ab249ae9c47db3f) 1.0.10 (@machellerogden)
- [58d9f5e](https://github.com/carsdotcom/bitcar/commit/58d9f5e4638f15df7970ea758e3460f7c886dbfb) fixes (@machellerogden)

### v1.0.9 (2017/02/10 20:39 +00:00)
- [fd7de29](https://github.com/carsdotcom/bitcar/commit/fd7de292e7c66f2f1ad29a12fa2c5e9e458e7607) 1.0.9 (@machellerogden)
- [798dacf](https://github.com/carsdotcom/bitcar/commit/798dacf47576879fb390ff5b8c4118caad2df165) adding some style to the setup instruction output (@machellerogden)

### v1.0.8 (2017/02/10 20:32 +00:00)
- [0d737ee](https://github.com/carsdotcom/bitcar/commit/0d737eeeb52394c2ec2a1ab259516f71353e99e6) 1.0.8 (@machellerogden)
- [0f85c00](https://github.com/carsdotcom/bitcar/commit/0f85c00f477f74cada8c594b6ae0846e18ff90a8) cleaning up and clarifying language in output and in README for consistency (@machellerogden)

### v1.0.7 (2017/02/10 20:21 +00:00)
- [4d01924](https://github.com/carsdotcom/bitcar/commit/4d019248881a2edad6fe1edcad3be7d7d592c39a) 1.0.7 (@machellerogden)
- [4a4513b](https://github.com/carsdotcom/bitcar/commit/4a4513b34217ba7d86616b9374fee9735003a1f3) fix minor spacing issue in setup of bash_profile (@machellerogden)

### v1.0.6 (2017/02/10 20:13 +00:00)
- [59794aa](https://github.com/carsdotcom/bitcar/commit/59794aad16e5c647153812be548157ace9cd0110) 1.0.6 (@machellerogden)
- [e7f0876](https://github.com/carsdotcom/bitcar/commit/e7f0876725ee9f7872ab6307ac51c71929230c9c) fix issue with automatic init (@machellerogden)

### v1.0.5 (2017/02/10 19:55 +00:00)
- [b35e0a7](https://github.com/carsdotcom/bitcar/commit/b35e0a7a8498a60a91d33022b63ab1203ee99d6c) 1.0.5 (@machellerogden)
- [7f1f45f](https://github.com/carsdotcom/bitcar/commit/7f1f45f82b418b57aeb85024c857e75c4fefc823) fixing syntax issue in setup (@machellerogden)

### v1.0.4 (2017/02/10 19:54 +00:00)
- [d3022b1](https://github.com/carsdotcom/bitcar/commit/d3022b1e5bca19a3c18f6ffc6df2b0527ea7108f) 1.0.4 (@machellerogden)
- [e69ded2](https://github.com/carsdotcom/bitcar/commit/e69ded2cddf2b4d8d571c8965f28b5f5ff375a9e) fixing setup (@machellerogden)

### v1.0.3 (2017/02/10 19:48 +00:00)
- [3dcac1a](https://github.com/carsdotcom/bitcar/commit/3dcac1a3e1bd89b1778e9b34bdd8c0de1be2530a) 1.0.3 (@machellerogden)
- [d67f277](https://github.com/carsdotcom/bitcar/commit/d67f277dd703e8119d6312613290c2e310fcb0cc) simplify bash function and support colors (@machellerogden)
- [b097021](https://github.com/carsdotcom/bitcar/commit/b097021a983eea66b0de5ecf5e0e538194722502) adding basic test setup (@machellerogden)

### v1.0.2 (2017/02/10 16:56 +00:00)
- [3019a29](https://github.com/carsdotcom/bitcar/commit/3019a2931c5ea0198cd5a85fdea85ba1794dc56d) 1.0.2 (@machellerogden)
- [2dfe86b](https://github.com/carsdotcom/bitcar/commit/2dfe86bdeed57089625c5d7777102534d37d96a0) updates to README (@machellerogden)

### v1.0.1 (2017/02/10 16:40 +00:00)
- [25e8370](https://github.com/carsdotcom/bitcar/commit/25e8370be6bb3c22035344070cc735887b7ba53d) 1.0.1 (@machellerogden)
- [abc7b32](https://github.com/carsdotcom/bitcar/commit/abc7b32b32e8c4406c87ebaa1b2fcd01d2a53f78) fixing setup and issue with completions (@machellerogden)
- [ae522f3](https://github.com/carsdotcom/bitcar/commit/ae522f3851adaddbc39ecf422e5899c6066af2ca) fixing README (@machellerogden)
- [65be670](https://github.com/carsdotcom/bitcar/commit/65be67062b9b66dbd840b17daddc5e7864166d09) adding note about bash requirement (@machellerogden)
- [f1410a2](https://github.com/carsdotcom/bitcar/commit/f1410a25764e0de42a25a2b1ca2de3b48ecf7ef3) fixing image reference (@machellerogden)

### v1.0.0 (2017/02/09 22:26 +00:00)
- [728ce78](https://github.com/carsdotcom/bitcar/commit/728ce78e2cde05c05842fd9c28dfa7722a43c934) initial commit (@machellerogden)
6 changes: 4 additions & 2 deletions lib/forceLatest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const path = require('path');
const Promise = require('bluebird');
const workspaceDir = require('./workspaceDir');
const gitFactory = require('./gitFactory');
const output = require('./output');

module.exports = forceLatest;

Expand All @@ -12,11 +13,12 @@ function forceLatest(sourceResult) {
if (fs.existsSync(sourceResult.repoDir)) {
let git = gitFactory.getInstance(sourceResult.repoDir);
return git.fetch([ 'origin' ], (fetchErr) => {
if (fetchErr) console.log('Error trying to fetch ' + sourceResult.clone + '. Message: ' + fetchErr);
if (fetchErr) output.log('Error trying to fetch ' + sourceResult.clone + '. Message: ' + fetchErr);
git.reset([ '--hard', 'origin/master' ], (resetErr) => {
if (resetErr) console.log('Error trying to reset hard to origin/master for ' + sourceResult.clone + '. Message: ' + resetErr);
if (resetErr) output.log('Error trying to reset hard to origin/master for ' + sourceResult.clone + '. Message: ' + resetErr);
return git.clean('f', [ '-d' ], (cleanErr) => {
if (cleanErr) return reject(cleanErr);
git = null;
return resolve(sourceResult);
});
});
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"scripts": {
"lint": "./node_modules/.bin/eslint .",
"test": "./node_modules/.bin/mocha \"test/**/*.js\"",
"watch": "npm run test -- --watch",
"changelog": "./node_modules/.bin/github-changes -o carsdotcom -r bitcar",
"generate-and-stage-changelog": "npm run changelog && git add -A",
"coverage": "rm -rf coverage && node node_modules/.bin/istanbul cover -x \"test/**/*.js\" --dir=\"coverage\" --root=\"./\" node_modules/.bin/_mocha -- \"test/**/*.js\"",
Expand Down

0 comments on commit d8cdbb1

Please sign in to comment.