1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | var
|
12 |
|
13 | process = require('child_process'),
|
14 |
|
15 |
|
16 | release = require('../config/admin/release'),
|
17 |
|
18 |
|
19 | repos = release.distributions.concat(release.components),
|
20 | total = repos.length,
|
21 | index = -1,
|
22 |
|
23 | stream,
|
24 | stepRepo
|
25 | ;
|
26 |
|
27 | module.exports = function(callback) {
|
28 |
|
29 | console.log('Registering repos with package managers');
|
30 |
|
31 |
|
32 | stepRepo = function() {
|
33 | index = index + 1;
|
34 | if(index >= total) {
|
35 | callback();
|
36 | return;
|
37 | }
|
38 | var
|
39 | repo = repos[index].toLowerCase(),
|
40 | outputDirectory = release.outputRoot + repo + '/',
|
41 | exec = process.exec,
|
42 | execSettings = {cwd: outputDirectory},
|
43 | updateNPM = 'npm publish;meteor publish;'
|
44 | ;
|
45 |
|
46 |
|
47 | exec(updateNPM, execSettings, function(err, stdout, stderr) {
|
48 | console.log(err, stdout, stderr);
|
49 | stepRepo();
|
50 | });
|
51 |
|
52 | };
|
53 | stepRepo();
|
54 | };
|
55 |
|