UNPKG

1.09 kBJavaScriptView Raw
1#!/usr/bin/env node
2/* eslint-disable */
3const shelljs = require('shelljs');
4const path = require('path');
5const fileExists = require('file-exists');
6const gitLabIOS = require('./gitlab/ios');
7const gitLabAndroid = require('./gitlab/android');
8const svnIOS = require('./svn/ios');
9const packageJSON = require('../../../../package.json');
10
11// 获取类型 eg. beta | official
12const build_type = process.env.build_type || 'beta';
13// 获取平台 eg. android | ios
14const platform = process.env.platform || 'ios';
15// 获取项目url
16const repo_url = packageJSON.gitlab_repo.url;
17
18if (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