1
- var cheerio = require ( "cheerio" ) ,
2
- fs = require ( "fs" ) ,
3
- scp = require ( "scp" ) ,
4
- path = require ( "path" ) ,
5
- semver = require ( "semver" ) ,
6
- shell = require ( "shelljs" ) ;
7
-
8
1
module . exports = function ( Release ) {
9
- var clonedRepos = { } ;
2
+ var cheerio = require ( "cheerio" ) ,
3
+ fs = require ( "fs" ) ,
4
+ semver = require ( "semver" ) ,
5
+ shell = require ( "shelljs" ) ,
6
+ clonedRepos = { } ;
10
7
11
8
Release . define ( {
12
9
issueTracker : "github" ,
@@ -15,9 +12,7 @@ module.exports = function( Release ) {
15
12
} ,
16
13
17
14
generateArtifacts : function ( done ) {
18
- Release . exec (
19
- "grunt dist:release"
20
- ) ;
15
+ Release . exec ( "grunt dist:release" ) ;
21
16
done ( [ ] ) ;
22
17
} ,
23
18
@@ -27,7 +22,7 @@ module.exports = function( Release ) {
27
22
28
23
if ( ! clonedRepos [ remote ] ) {
29
24
console . log ( "Cloning " + remote . cyan + "..." ) ;
30
- Release . git ( "clone " + remote + " " + local , "Error cloning Demos repo." ) ;
25
+ Release . exec ( "git clone " + remote + " " + local , "Error cloning Demos repo." ) ;
31
26
console . log ( ) ;
32
27
33
28
clonedRepos [ remote ] = local ;
@@ -48,17 +43,18 @@ module.exports = function( Release ) {
48
43
49
44
if ( ! Release . preRelease ) {
50
45
console . log ( "Updating demos index..." ) ;
51
- fs . writeFileSync ( repo + "/index.php" , "<?php header('Location: " + Release . newVersion + "');" ) ;
46
+ fs . writeFileSync ( repo + "/index.php" ,
47
+ "<?php header('Location: " + Release . newVersion + "');" ) ;
52
48
}
53
49
54
50
console . log ( "Adding files..." ) ;
55
51
process . chdir ( repo ) ;
56
- Release . git ( "add ." , "Error adding files." ) ;
57
- Release . git ( "commit -m '" + commitMessage + "'" , "Error commiting demos files." ) ;
52
+ Release . exec ( "git add ." , "Error adding files." ) ;
53
+ Release . exec ( "git commit -m '" + commitMessage + "'" , "Error commiting demos files." ) ;
58
54
Release . exec ( "npm version patch" ) ;
59
55
if ( ! Release . isTest ) {
60
56
console . log ( "Pushing to github..." ) ;
61
- Release . git ( "push --tags origin master" , "Error pushing demos to github." ) ;
57
+ Release . exec ( "git push --tags origin master" , "Error pushing demos to github." ) ;
62
58
}
63
59
console . log ( ) ;
64
60
} ,
@@ -69,7 +65,7 @@ module.exports = function( Release ) {
69
65
70
66
if ( ! clonedRepos [ remote ] ) {
71
67
console . log ( "Cloning " + remote . cyan + "..." ) ;
72
- Release . git ( "clone " + remote + " " + local , "Error cloning website repo." ) ;
68
+ Release . exec ( "git clone " + remote + " " + local , "Error cloning website repo." ) ;
73
69
console . log ( ) ;
74
70
75
71
clonedRepos [ remote ] = local ;
@@ -119,11 +115,12 @@ module.exports = function( Release ) {
119
115
120
116
console . log ( "Adding files..." ) ;
121
117
process . chdir ( repo ) ;
122
- Release . git ( "add ." , "Error adding files." ) ;
123
- Release . git ( "commit -m '" + commitMessage + "'" , "Error commiting builder files." ) ;
118
+ Release . exec ( "git add ." , "Error adding files." ) ;
119
+ Release . exec ( "git commit -m '" + commitMessage + "'" ,
120
+ "Error commiting builder files." ) ;
124
121
if ( ! Release . isTest ) {
125
122
console . log ( "Pushing to github..." ) ;
126
- Release . git ( "push" , "Error pushing builder update to github." ) ;
123
+ Release . exec ( "git push" , "Error pushing builder update to github." ) ;
127
124
}
128
125
console . log ( ) ;
129
126
} ,
@@ -141,11 +138,11 @@ module.exports = function( Release ) {
141
138
142
139
console . log ( "Adding files..." ) ;
143
140
process . chdir ( repo ) ;
144
- Release . git ( "add ." , "Error adding zip files." ) ;
145
- Release . git ( "commit -m '" + commitMessage + "'" , "Error commiting zip files." ) ;
141
+ Release . exec ( "git add ." , "Error adding zip files." ) ;
142
+ Release . exec ( "git commit -m '" + commitMessage + "'" , "Error commiting zip files." ) ;
146
143
if ( ! Release . isTest ) {
147
144
console . log ( "Pushing to github..." ) ;
148
- Release . git ( "push" , "Error pushing zip files to github." ) ;
145
+ Release . exec ( "git push" , "Error pushing zip files to github." ) ;
149
146
}
150
147
console . log ( ) ;
151
148
} ,
@@ -168,3 +165,8 @@ module.exports = function( Release ) {
168
165
}
169
166
} ) ;
170
167
} ;
168
+
169
+ module . exports . dependencies = [
170
+ "semver@2.2.1" ,
171
+ "shelljs@0.2.6"
172
+ ] ;
0 commit comments