feat: add signtool to plugin repository
- Migrate signing tool from GoTunnel main project - Self-contained, no external dependencies - Updated CI workflow to build locally
This commit is contained in:
@@ -15,13 +15,19 @@ 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"
|
||||
|
||||
for manifest in plugins/*/manifest.json; do
|
||||
if [ ! -f "$manifest" ]; then
|
||||
continue
|
||||
fi
|
||||
[ -f "$manifest" ] || continue
|
||||
|
||||
dir=$(dirname "$manifest")
|
||||
name=$(jq -r '.name' "$manifest")
|
||||
@@ -34,7 +40,7 @@ for manifest in plugins/*/manifest.json; do
|
||||
fi
|
||||
|
||||
echo "Signing: $name v$version"
|
||||
signtool sign -key "$KEY_FILE" \
|
||||
"$SIGNTOOL" sign -key "$KEY_FILE" \
|
||||
-name "$name" \
|
||||
-version "$version" \
|
||||
"$plugin_file"
|
||||
|
||||
Reference in New Issue
Block a user