remove yaml devp

This commit is contained in:
buqiyuan 2022-07-11 10:49:34 +08:00
parent f060145326
commit 2bf2bbc7f9
4 changed files with 6 additions and 23 deletions

View File

@ -18,7 +18,7 @@
"publish": [
{
"provider": "generic",
"url": "https://packages.eoapi.io"
"url": "https://packages.eoapi.io/latest"
},
"github"
],

View File

@ -65,11 +65,10 @@
"npm-run-all": "4.1.5",
"ts-node": "10.8.1",
"typescript": "~4.7.4",
"wait-on": "6.0.1",
"yaml": "2.1.1"
"wait-on": "6.0.1"
},
"__npminstall_done": false,
"node-module-alias": {
"eo": "./out"
}
}
}

View File

@ -1,6 +1,4 @@
const qiniu = require('qiniu');
const YAML = require('yaml');
const fs = require('fs');
const { AK, SK, bucket } = require('./qiniu_env.js');
const package = require('./package.json');
@ -47,7 +45,7 @@ const fileList = [
'release/eoapi Setup ?.exe',
'release/eoapi-?.dmg',
'release/eoapi-?-arm64.dmg',
'release/eoapi-?.zip',
'release/eoapi-?-mac.zip',
'release/latest.yml',
'release/latest-mac.yml',
].map((it) => it.replace(/\?/, `${version}`));
@ -61,17 +59,8 @@ const app = async () => {
let isOK;
// * 生成上传 Token
try {
if (it.endsWith('.yml')) {
const ymlObj = YAML.parse(fs.readFileSync(it, 'utf8'));
ymlObj.files.forEach((n) => (n.url = `${ymlObj.version}/${n.url}`));
ymlObj.path = `${ymlObj.version}/${ymlObj.path}`;
fs.writeFileSync(it, YAML.stringify(ymlObj));
const token = uptoken(bucket, it.replace(/release\//, ''));
isOK = await uploadFile(token, it.replace(/release\//, ''), it);
} else {
const token = uptoken(bucket, `${version}/${it.replace(/release\//, '')}`);
isOK = await uploadFile(token, `${version}/${it.replace(/release\//, '')}`, it);
}
const token = uptoken(bucket, `${version}/${it.replace(/release\//, '')}`);
isOK = await uploadFile(token, `${version}/${it.replace(/release\//, '')}`, it);
} catch (error) {
console.log('error', error);
}

View File

@ -13138,11 +13138,6 @@ yallist@^4.0.0:
resolved "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
yaml@2.1.1:
version "2.1.1"
resolved "https://registry.npmmirror.com/yaml/-/yaml-2.1.1.tgz#1e06fb4ca46e60d9da07e4f786ea370ed3c3cfec"
integrity sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==
yaml@^1.10.0, yaml@^1.10.2:
version "1.10.2"
resolved "https://registry.npmmirror.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"