Skip to content

Commit

Permalink
feat: replace reg
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed Feb 16, 2023
1 parent b5288f9 commit 263cb4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down

0 comments on commit 263cb4f

Please sign in to comment.