feat: replace reg

This commit is contained in:
夜鹰 2023-02-16 15:42:23 +08:00
parent b5288f96d7
commit 263cb4f0d1
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ qiniu.conf.ACCESS_KEY = AK;
qiniu.conf.SECRET_KEY = SK;
const toLatest = name => name.replace(/\d+\.\d+\.\d+/, 'latest');
const onlyName = name => name.replace(/build|release\//, '');
const onlyName = name => name.replace(/build\/|release\//, '');
// * 构建客户端实例
const client = new qiniu.rs.Client();

View File

@ -10,7 +10,7 @@ qiniu.conf.SECRET_KEY = SK;
const uptoken = (bucket, key) => new qiniu.rs.PutPolicy(bucket + ':' + key).token();
const toLatest = name => name.replace(/\d+\.\d+\.\d+/, 'latest');
const onlyName = name => name.replace(/build|release\//, '');
const onlyName = name => name.replace(/build\/|release\//, '');
// * 检测文件是否存在
const isExists = async filePath =>