@@ -196,19 +196,32 @@ module.exports = function (grunt) {
196
196
src : [ 'benchmarks/*.js' ]
197
197
}
198
198
} ,
199
- shell : {
199
+ exec : {
200
+ 'meteor-init' : {
201
+ command : [
202
+ // Make sure Meteor is installed, per https://meteor.com/install.
203
+ // The curl'ed script is safe; takes 2 minutes to read source & check.
204
+ 'type meteor >/dev/null 2>&1 || { curl https://install.meteor.com/ | sh; }' ,
205
+ // Meteor expects package.js to be in the root directory of
206
+ // the checkout, but we already have a package.js for Dojo
207
+ 'mv package.js package.dojo && cp meteor/package.js .'
208
+ ] . join ( ';' )
209
+ } ,
210
+ 'meteor-cleanup' : {
211
+ // remove build files and restore Dojo's package.js
212
+ command : 'rm -rf ".build.*" versions.json; mv package.dojo package.js'
213
+ } ,
200
214
'meteor-test' : {
201
- command : 'meteor/runtests.sh '
215
+ command : 'spacejam --mongo-url mongodb:// test-packages ./ '
202
216
} ,
203
217
'meteor-publish' : {
204
- command : 'meteor/ publish.sh '
218
+ command : 'meteor publish'
205
219
}
206
220
}
207
221
208
222
} ) ;
209
223
210
224
grunt . loadTasks ( 'tasks' ) ;
211
- grunt . loadNpmTasks ( 'grunt-shell' ) ;
212
225
213
226
// These plugins provide necessary tasks.
214
227
require ( 'load-grunt-tasks' ) ( grunt ) ;
@@ -223,7 +236,7 @@ module.exports = function (grunt) {
223
236
grunt . registerTask ( 'test:browser' , [ 'concat' , 'embedLocales' , 'karma:chrome' , 'karma:firefox' ] ) ;
224
237
grunt . registerTask ( 'test:sauce-browser' , [ 'concat' , 'embedLocales' , 'env:sauceLabs' , 'karma:sauce' ] ) ;
225
238
grunt . registerTask ( 'test:travis-sauce-browser' , [ 'concat' , 'embedLocales' , 'karma:sauce' ] ) ;
226
- grunt . registerTask ( 'test:meteor' , [ 'shell :meteor-test' ] ) ;
239
+ grunt . registerTask ( 'test:meteor' , [ 'exec :meteor-init' , 'exec:meteor- test' , 'exec:meteor-cleanup '] ) ;
227
240
228
241
// travis build task
229
242
grunt . registerTask ( 'build:travis' , [
@@ -233,9 +246,12 @@ module.exports = function (grunt) {
233
246
'test:node'
234
247
] ) ;
235
248
249
+ grunt . registerTask ( 'publish-meteor' , [ 'exec:meteor-init' , 'exec:meteor-publish' , 'exec:meteor-cleanup' ] ) ;
250
+
236
251
// Task to be run when releasing a new version
237
252
grunt . registerTask ( 'release' , [
238
253
'jshint' , 'nodeunit' , 'concat' , 'embedLocales' ,
239
- 'component' , 'uglify:main' , 'shell:meteor-publish'
254
+ 'component' , 'uglify:main' ,
255
+ 'publish-meteor'
240
256
] ) ;
241
257
} ;
0 commit comments