UNPKG

@molejs/mole-tools

Version:

Configuration and scripts for Mole App.

51 lines (36 loc) 1.09 kB
#!/usr/bin/env node /* eslint-disable */ const shelljs = require('shelljs'); const path = require('path'); const fileExists = require('file-exists'); const gitLabIOS = require('./gitlab/ios'); const gitLabAndroid = require('./gitlab/android'); const svnIOS = require('./svn/ios'); const packageJSON = require('../../../../package.json'); // 获取类型 eg. beta | official const build_type = process.env.build_type || 'beta'; // 获取平台 eg. android | ios const platform = process.env.platform || 'ios'; // 获取项目url const repo_url = packageJSON.gitlab_repo.url; if (platform === 'ios') { gitLabIOS.publish({ repo_url, build_type, platform, }); svnIOS.publish({ repo_url: packageJSON.release_repo[build_type].url, build_type, platform, username : packageJSON.release_repo.svn_username, password : packageJSON.release_repo.svn_password, }); shelljs.rm('-rf', ['./.mole-tools-tmp']); } else if (platform === 'android') { gitLabAndroid.publish({ repo_url, build_type, }) shelljs.rm('-rf', ['./.mole-tools-tmp']); }