1 | #!/usr/bin/env node
|
2 |
|
3 | const shelljs = require('shelljs');
|
4 | const path = require('path');
|
5 | const fileExists = require('file-exists');
|
6 | const gitLabIOS = require('./gitlab/ios');
|
7 | const gitLabAndroid = require('./gitlab/android');
|
8 | const svnIOS = require('./svn/ios');
|
9 | const packageJSON = require('../../../../package.json');
|
10 |
|
11 |
|
12 | const build_type = process.env.build_type || 'beta';
|
13 |
|
14 | const platform = process.env.platform || 'ios';
|
15 |
|
16 | const repo_url = packageJSON.gitlab_repo.url;
|
17 |
|
18 | if (platform === 'ios') {
|
19 | gitLabIOS.publish({
|
20 | repo_url,
|
21 | build_type,
|
22 | platform,
|
23 | });
|
24 | svnIOS.publish({
|
25 | repo_url: packageJSON.release_repo[build_type].url,
|
26 | build_type,
|
27 | platform,
|
28 | username : packageJSON.release_repo.svn_username,
|
29 | password : packageJSON.release_repo.svn_password,
|
30 | });
|
31 | shelljs.rm('-rf', ['./.mole-tools-tmp']);
|
32 | } else if (platform === 'android') {
|
33 | gitLabAndroid.publish({
|
34 | repo_url,
|
35 | build_type,
|
36 | })
|
37 | shelljs.rm('-rf', ['./.mole-tools-tmp']);
|
38 | }
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|