Skip to content

Commit b0e571b

Browse files
committed
Merge pull request moment#2073 from MeteorPackaging/meteor-integration
Get rid of the .sh scripts; target all Meteor versions
2 parents 352f2f5 + 955dfcc commit b0e571b

File tree

5 files changed

+26
-129
lines changed

5 files changed

+26
-129
lines changed

Gruntfile.js

+22-6
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,32 @@ module.exports = function (grunt) {
196196
src: ['benchmarks/*.js']
197197
}
198198
},
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+
},
200214
'meteor-test': {
201-
command: 'meteor/runtests.sh'
215+
command: 'spacejam --mongo-url mongodb:// test-packages ./'
202216
},
203217
'meteor-publish': {
204-
command: 'meteor/publish.sh'
218+
command: 'meteor publish'
205219
}
206220
}
207221

208222
});
209223

210224
grunt.loadTasks('tasks');
211-
grunt.loadNpmTasks('grunt-shell');
212225

213226
// These plugins provide necessary tasks.
214227
require('load-grunt-tasks')(grunt);
@@ -223,7 +236,7 @@ module.exports = function (grunt) {
223236
grunt.registerTask('test:browser', ['concat', 'embedLocales', 'karma:chrome', 'karma:firefox']);
224237
grunt.registerTask('test:sauce-browser', ['concat', 'embedLocales', 'env:sauceLabs', 'karma:sauce']);
225238
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']);
227240

228241
// travis build task
229242
grunt.registerTask('build:travis', [
@@ -233,9 +246,12 @@ module.exports = function (grunt) {
233246
'test:node'
234247
]);
235248

249+
grunt.registerTask('publish-meteor', ['exec:meteor-init', 'exec:meteor-publish', 'exec:meteor-cleanup']);
250+
236251
// Task to be run when releasing a new version
237252
grunt.registerTask('release', [
238253
'jshint', 'nodeunit', 'concat', 'embedLocales',
239-
'component', 'uglify:main', 'shell:meteor-publish'
254+
'component', 'uglify:main',
255+
'publish-meteor'
240256
]);
241257
};

meteor/package.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Package.describe({
1313
});
1414

1515
Package.onUse(function (api) {
16-
api.versionsFrom('METEOR@1.0');
16+
api.versionsFrom(['METEOR@0.9.0', 'METEOR@1.0']);
1717
api.export('moment');
1818
api.addFiles([
1919
'moment.js',

meteor/publish.sh

-82
This file was deleted.

meteor/runtests.sh

-38
This file was deleted.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@
5353
"grunt-karma": "latest",
5454
"grunt-benchmark": "latest",
5555
"grunt-string-replace": "latest",
56-
"grunt-shell": "latest",
56+
"grunt-exec": "latest",
5757
"load-grunt-tasks": "latest",
5858
"karma": "latest",
5959
"karma-chrome-launcher": "latest",
6060
"karma-firefox-launcher": "latest",
6161
"karma-nodeunit": "latest",
62-
"karma-sauce-launcher": "latest"
62+
"karma-sauce-launcher": "latest",
63+
"spacejam": "latest"
6364
},
6465
"scripts": {
6566
"test": "grunt test:node"

0 commit comments

Comments
 (0)