代码拉取完成,页面将自动刷新
const { env } = process;
const oss = require('.');
const pkg = require('./package.json');
const check = require('./publish-check');
const store = oss({
accessKeyId: env.ALI_SDK_OSS_CDN_ID,
accessKeySecret: env.ALI_SDK_OSS_CDN_SECRET,
endpoint: env.ALI_SDK_OSS_CDN_ENDPOINT,
bucket: env.ALI_SDK_OSS_CDN_BUCKET,
});
const current = `aliyun-oss-sdk-${pkg.version}.min.js`;
const dist = './dist/aliyun-oss-sdk.min.js';
async function checkFile() {
try {
check.checkDist(dist); // check file exist
const contentMd5 = await check.caculateFileMd5(dist); // check md5 to server
await store.put(current, dist, {
headers: {
'Content-Md5': contentMd5,
},
});
await check.checkCDNFile(current, store);// check cdn file
console.log(`publish CDN success, version is ${pkg.version}`);
} catch (e) {
console.log(e);
}
}
checkFile();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。