Skip to content

Commit

Permalink
修复更新时间问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lxlhlp committed Oct 21, 2024
1 parent 92e6b91 commit 37ea94f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
14 changes: 11 additions & 3 deletions appcast.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
{
"identifier": "chatglm.plugins.translate",
"versions": [
{
"version": "1.1.1",
"desc": "新增功能",
"sha256": "25b92bf97d787034b210d3d1e0e46ea7e91792b01c2b06d5197f0de717933432",
"url": "https://github.com/lxlhlp/bob-plugin-chatglm-translate/releases/download/v1.1.1/bob-plugin-chatglm-translate-v1.1.1.bobplugin",
"minBobVersion": "1.8.0",
"timestamp": 1729476070000
},
{
"version": "1.1.0",
"desc": "新增功能",
"sha256": "3e4dbde38f87316009d3cbf650a4ab2b5fe5c0e23aeca16ed2341834cce1b61c",
"url": "https://github.com/lxlhlp/bob-plugin-chatglm-translate/releases/download/1.1.0/bob-plugin-chatglm-translate.bobplugin",
"url": "https://github.com/lxlhlp/bob-plugin-chatglm-translate/releases/download/v1.1.0/bob-plugin-chatglm-translate-v1.1.0.bobplugin",
"minBobVersion": "1.8.0",
"timestamp": 1728986199
"timestamp": 1729135870000
},
{
"version": "1.0.0",
"desc": "首发版本",
"sha256": "fc2a3da9b54cb8b35b95adbdd686a9f4835c3f0c86c0ff37ec441d30d2dc9db2",
"url": "https://github.com/lxlhlp/bob-plugin-chatglm-translate/releases/download/v1.0.0/bob-plugin-chatglm-translate.bobplugin",
"minBobVersion": "1.8.0",
"timestamp": 1728889515
"timestamp": 1728889515000
}
]
}
Binary file not shown.
12 changes: 8 additions & 4 deletions package.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
zip -0 -j -r ./bob-plugin-chatglm-translate.bobplugin ./src/*
version=$(jq -r .version ./src/info.json)

zip -0 -j -r ./bob-plugin-chatglm-translate-v$version.bobplugin ./src/*


version=$(jq -r .version ./src/info.json)

echo $version

hash=$(shasum -a 256 ./bob-plugin-chatglm-translate.bobplugin | cut -d ' ' -f 1)
hash=$(shasum -a 256 ./bob-plugin-chatglm-translate-v$version.bobplugin | cut -d ' ' -f 1)

timestamp=$(date +%s)
timestamp=$(date +%s000)

newVersion=$(cat << EOF
{
"version": "$version",
"desc": "新增功能",
"sha256": "$hash",
"url": "https://github.com/lxlhlp/bob-plugin-chatglm-translate/releases/download/$version/bob-plugin-chatglm-translate.bobplugin",
"url": "https://github.com/lxlhlp/bob-plugin-chatglm-translate/releases/download/v$version/bob-plugin-chatglm-translate-v$version.bobplugin",
"minBobVersion": "1.8.0",
"timestamp": $timestamp
}
EOF
)

echo $newVersion

jq --argjson newVersion "$newVersion" '.versions |= [$newVersion] + .' ./appcast.json > temp.json


Expand Down
2 changes: 1 addition & 1 deletion src/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"identifier": "chatglm.plugins.translate",
"version": "1.1.0",
"version": "1.1.1",
"category": "translate",
"name": "智普翻译",
"summary": "智普清言翻译插件",
Expand Down

0 comments on commit 37ea94f

Please sign in to comment.