Commit 5109e3b3 authored by 智勇's avatar 智勇

替换静态文件

parent 1736fbbf
......@@ -50,6 +50,9 @@ for file in files:
if rule.get('useNamespace', None) and rule['to']:
rule['to'] = '-' + namespace + rule['to']
if rule.get('useSystemName',None) and rule['reg']:
rule['reg'] = rule['reg'] + '/' + project + '/public'
if rule['reg']:
p = re.compile(r'' + rule['reg'])
line = re.sub(p, rule['to'], line)
......
# reg: 匹配的正则
# to: 正则匹配后替换需要的值
# useNamespace: 是否在替换的值前追加 '-[namespace名称]'
# useSystemName: 项目名称
lkbDomain: &lkbDomain '.liangkebang.com'
......@@ -35,6 +36,11 @@ h5AuthRule: &h5AuthRule
reg: 'h5.auth.quantgroup.cn'
to: 'operator.liangkebang.com'
staticRule: &staticRule
reg: 'static.q-gp.com'
to: ''
useSystemName: true
common: &common
xyqbApiRule: *xyqbApiRule
quantgroupApiRule: *quantgroupApiRule
......@@ -42,3 +48,4 @@ common: &common
# xyqbApiDomainRule: *xyqbApiDomainRule
qgApiRule: *qgApiRule
qgCookieRule: *qgCookieRule
staticRule: *staticRule
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment