|
|
@ -2,7 +2,7 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-05-05 14:40:00
|
|
|
|
* @Date: 2022-05-05 14:40:00
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-05-05 17:53:47
|
|
|
|
* @LastEditTime: 2022-05-07 10:05:44
|
|
|
|
* @Description: 根据git分支生成对应环境的环境变量
|
|
|
|
* @Description: 根据git分支生成对应环境的环境变量
|
|
|
|
* 开发时如果环境变量换了,可以不用重启服务,直接运行node env.config.js即可
|
|
|
|
* 开发时如果环境变量换了,可以不用重启服务,直接运行node env.config.js即可
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -17,7 +17,7 @@ const envConfig = {
|
|
|
|
test : {
|
|
|
|
test : {
|
|
|
|
base_url: 'xxx'
|
|
|
|
base_url: 'xxx'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
reslese : {
|
|
|
|
beta : {
|
|
|
|
base_url: 'xxx'
|
|
|
|
base_url: 'xxx'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
prod : {
|
|
|
|
prod : {
|
|
|
@ -31,7 +31,7 @@ switch (branch){
|
|
|
|
curEnvConfig = envConfig.test;
|
|
|
|
curEnvConfig = envConfig.test;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'msb_beta':
|
|
|
|
case 'msb_beta':
|
|
|
|
curEnvConfig = envConfig.release;
|
|
|
|
curEnvConfig = envConfig.beta;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'msb_prod':
|
|
|
|
case 'msb_prod':
|
|
|
|
curEnvConfig = envConfig.prod;
|
|
|
|
curEnvConfig = envConfig.prod;
|
|
|
|