chore: 保存 Agent 安全优化前基线
This commit is contained in:
1 parent
08696896f9
commit
ff016347cd
116 files changed
+3858
-2485
No files matched your search
+20
-2
@@ -25,6 +25,8 @@ OpsXShell 原生安装包构建脚本
|
||||
mac-arm64 macOS Apple Silicon,生成 .app 和 .dmg
|
||||
mac-x64 macOS Intel,生成 .app 和 .dmg
|
||||
win-x64 Windows x86_64,生成 NSIS/MSI 安装包
|
||||
linux-x64 Linux x86_64,生成 deb/rpm/AppImage
|
||||
linux-arm64 Linux aarch64,生成 deb/rpm/AppImage
|
||||
|
||||
选项:
|
||||
--quick 构建前只运行快速门禁
|
||||
@@ -39,7 +41,7 @@ OpsXShell 原生安装包构建脚本
|
||||
说明:
|
||||
- 显式传入新版本时,会同步 package.json、package-lock.json、
|
||||
Cargo.toml、Cargo.lock 和 tauri.conf.json,但不会创建或推送 Git tag。
|
||||
- Windows 包必须在 Windows 上构建;macOS 包必须在 macOS 上构建。
|
||||
- Windows 包必须在 Windows 上构建;macOS 包必须在 macOS 上构建;Linux 包必须在 Linux 上构建。
|
||||
- 正式签名构建请先设置 REQUIRE_SIGNING=true 及对应签名环境变量。
|
||||
EOF
|
||||
}
|
||||
@@ -65,7 +67,7 @@ while [ "$#" -gt 0 ]; do
|
||||
--skip-checks)
|
||||
CHECK_MODE="none"
|
||||
;;
|
||||
auto|mac-arm64|mac-x64|win-x64)
|
||||
auto|mac-arm64|mac-x64|win-x64|linux-x64|linux-arm64)
|
||||
TARGET="$1"
|
||||
;;
|
||||
v[0-9]*|[0-9]*)
|
||||
@@ -97,6 +99,8 @@ if [ "$TARGET" = "auto" ]; then
|
||||
Darwin/arm64|Darwin/aarch64) TARGET="mac-arm64" ;;
|
||||
Darwin/x86_64) TARGET="mac-x64" ;;
|
||||
MINGW*/*|MSYS*/*|CYGWIN*/*) TARGET="win-x64" ;;
|
||||
Linux/x86_64) TARGET="linux-x64" ;;
|
||||
Linux/aarch64|Linux/arm64) TARGET="linux-arm64" ;;
|
||||
*) fail "当前平台 $HOST_OS/$HOST_ARCH 不支持自动打包,请显式指定目标" ;;
|
||||
esac
|
||||
fi
|
||||
@@ -123,6 +127,18 @@ case "$TARGET" in
|
||||
RELEASE_PLATFORM="windows"
|
||||
OUTPUT_PLATFORM="windows-x64"
|
||||
;;
|
||||
linux-x64)
|
||||
[ "$HOST_OS" = "Linux" ] || fail "linux-x64 必须在 Linux 上构建"
|
||||
RUST_TARGET="x86_64-unknown-linux-gnu"
|
||||
RELEASE_PLATFORM="linux"
|
||||
OUTPUT_PLATFORM="linux-x64"
|
||||
;;
|
||||
linux-arm64)
|
||||
[ "$HOST_OS" = "Linux" ] || fail "linux-arm64 必须在 Linux 上构建"
|
||||
RUST_TARGET="aarch64-unknown-linux-gnu"
|
||||
RELEASE_PLATFORM="linux"
|
||||
OUTPUT_PLATFORM="linux-arm64"
|
||||
;;
|
||||
esac
|
||||
|
||||
if command -v rustup >/dev/null 2>&1 && ! rustup target list --installed | grep -Fxq "$RUST_TARGET"; then
|
||||
@@ -177,6 +193,8 @@ shopt -s nullglob
|
||||
COPIED_ARTIFACTS=()
|
||||
if [ "$RELEASE_PLATFORM" = "macos" ]; then
|
||||
SOURCE_ARTIFACTS=("$BUNDLE_ROOT"/dmg/*.dmg)
|
||||
elif [ "$RELEASE_PLATFORM" = "linux" ]; then
|
||||
SOURCE_ARTIFACTS=("$BUNDLE_ROOT"/deb/*.deb "$BUNDLE_ROOT"/rpm/*.rpm "$BUNDLE_ROOT"/appimage/*.AppImage)
|
||||
else
|
||||
SOURCE_ARTIFACTS=("$BUNDLE_ROOT"/nsis/*.exe "$BUNDLE_ROOT"/msi/*.msi "$BUNDLE_ROOT"/wix/*.msi)
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user