fix: version

This commit is contained in:
msojocs 2022-03-07 11:28:07 +08:00
parent 09a4378c6d
commit 2e6c7bcb18
2 changed files with 3 additions and 2 deletions

View File

@ -70,7 +70,7 @@ else
echo "参数没有版本号"
VERSION_DATA=$( cat "$root_dir/conf/devtools_v" )
VERSION_DATA=(${VERSION_DATA//,/ })
TARGET_VERSION=${VERSION_DATA[0]}
TARGET_VERSION="version=${VERSION_DATA[0]}"
fi
echo "TARGET_VERSION: $TARGET_VERSION"
if [ ! -f "$root_dir/package.nw/package.json" ];then

View File

@ -120,7 +120,8 @@ const download = function (url) {
util.format("../cache/wechat_devtools_%s_x64.exe", version)
);
let headers = execSync(`curl -IL "${url}"`).toString()
md5 = headers.match(/X-COS-META-MD5: (.*?)\r/)[1]
console.log(headers)
md5 = headers.match(/X-COS-META-MD5: (.*?)\r/i)[1]
if (fs.existsSync(localPath)) {
resolve(localPath);