File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ grunt.registerTask( "docs", function() {
46
46
} ) ;
47
47
48
48
grunt . registerTask ( "clean-all" , function ( ) {
49
- var rimraf = require ( "rimraf" ) ;
49
+ var rimraf = require ( "rimraf" ) ,
50
+ retry = require ( "./lib/retrydb" ) ;
50
51
51
52
// clean repo checkouts
52
53
rimraf . sync ( config . repoDir ) ;
@@ -56,14 +57,15 @@ grunt.registerTask( "clean-all", function() {
56
57
rimraf . sync ( "last-action" ) ;
57
58
58
59
// clean retrydb
59
- rimraf . sync ( " retry.db" ) ;
60
+ rimraf . sync ( retry . dbPath ) ;
60
61
} ) ;
61
62
62
63
grunt . registerTask ( "clean" , function ( ) {
63
- var rimraf = require ( "rimraf" ) ;
64
+ var rimraf = require ( "rimraf" ) ,
65
+ retry = require ( "./lib/retrydb" ) ;
64
66
65
67
rimraf . sync ( "last-action" ) ;
66
- rimraf . sync ( " retry.db" ) ;
68
+ rimraf . sync ( retry . dbPath ) ;
67
69
} ) ;
68
70
69
71
grunt . registerTask ( "setup-pluginsdb" , function ( ) {
Original file line number Diff line number Diff line change 1
- var sqlite = require ( "sqlite3" ) ;
1
+ var sqlite = require ( "sqlite3" ) ,
2
+ path = require ( "path" ) ,
3
+ filename = path . join ( __dirname , "../retry.db" ) ;
2
4
3
5
var db ;
4
6
5
7
function connect ( fn ) {
6
- db = new sqlite . Database ( "retry.db" , fn ) ;
8
+ db = new sqlite . Database ( filename , fn ) ;
7
9
}
8
10
9
11
function auto ( fn ) {
@@ -26,6 +28,8 @@ function auto( fn ) {
26
28
}
27
29
28
30
module . exports = {
31
+ dbPath : filename ,
32
+
29
33
log : auto ( function ( method ) {
30
34
var str ,
31
35
fn = function ( ) { } ,
You can’t perform that action at this time.
0 commit comments