feat(store): 更新插件商店生成脚本和安全签名功能
All checks were successful
Sign Plugins / sign (push) Successful in 31s
All checks were successful
Sign Plugins / sign (push) Successful in 31s
- 修改 generate-store.sh 脚本添加 Gitea raw 文件基础 URL 配置 - 在 generate-store.sh 中为每个插件添加 download_url 和 signature_url 字段 - 扩展 signtool 工具添加 sign-json 命令用于签名 JSON 配置文件 - 更新 GitHub Actions 工作流添加对 security/*.json 文件的监控 - 新增 sign-security.sh 脚本用于批量签名安全相关 JSON 文件 - 添加 security/keys.json 和 security/revocation.json 模板文件
This commit is contained in:
36
scripts/sign-security.sh
Executable file
36
scripts/sign-security.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
KEY_FILE="$1"
|
||||
|
||||
if [ -z "$KEY_FILE" ]; then
|
||||
echo "Usage: $0 <private-key-file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
REPO_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
SIGNTOOL="$REPO_ROOT/signtool"
|
||||
|
||||
# 构建 signtool
|
||||
if [ ! -f "$SIGNTOOL" ]; then
|
||||
echo "Building signtool..."
|
||||
cd "$REPO_ROOT"
|
||||
go build -o signtool ./tools/signtool
|
||||
fi
|
||||
|
||||
cd "$REPO_ROOT"
|
||||
|
||||
# 签名撤销列表
|
||||
if [ -f "security/revocation.json" ]; then
|
||||
echo "Signing revocation.json..."
|
||||
"$SIGNTOOL" sign-json -key "$KEY_FILE" security/revocation.json
|
||||
fi
|
||||
|
||||
# 签名公钥列表
|
||||
if [ -f "security/keys.json" ]; then
|
||||
echo "Signing keys.json..."
|
||||
"$SIGNTOOL" sign-json -key "$KEY_FILE" security/keys.json
|
||||
fi
|
||||
|
||||
echo "Done!"
|
||||
Reference in New Issue
Block a user