AndroidStation(原中控改造为纯设备端) - 只做三件事:UDP 48899 被桌面端发现、TCP 8087 推送 USB 扫码结果、离线语音播报 - 扫码不再经过 UI:去掉逐键重绘,50ms 自动提交,同一码重复扫码也一律上报 - 离线语音种子(数字/字母/“开始打包”/欢迎语)随包安装,MediaPlayer 播放,启动把音量拉满 - 启动播报「欢迎使用溯源系统,初始化已经完成,扫码即可开始打包」 - 移除 Device Owner / 设备管理员 / lock task / 网络与 IP 设置等非普通应用能力(仅保留开机自启) - 正式签名 keystore + release 签名配置,versionName/versionCode 可由打包脚本覆盖 发布脚手架 - backend/android_client:Android 正式包构建(build.ps1 + package.config.json) - backend/scripts/deploy/publish-android.cjs + npm run android:build / android:publish - 桌面端安装包改为 download/desktop,Android 为 download/android_client; version.json 仍走 /download/version.json(老客户端写死),新增 /download/android_client/version.json - 谷歌插件随桌面端 MSI 安装到 <安装目录>\extension,工具菜单新增「复制谷歌插件地址」 - git-safety-check 增加仓库级禁区(keystore.properties / *.jks / local.properties) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
const { spawnSync } = require('node:child_process');
|
|
const { loadDeployConfig } = require('./deploy-lib.cjs');
|
|
|
|
function main() {
|
|
const config = loadDeployConfig('production');
|
|
|
|
const args = [ '-vv' ];
|
|
args.push('-p', String(config.port));
|
|
args.push('-i', config.privateKeyPath);
|
|
for (const option of config.sshOptions) {
|
|
args.push('-o', option);
|
|
}
|
|
args.push(`${config.username}@${config.host}`);
|
|
args.push('echo AUTH_CHECK_OK');
|
|
|
|
const result = spawnSync('ssh', args, {
|
|
encoding: 'utf8',
|
|
stdio: 'pipe',
|
|
shell: false,
|
|
});
|
|
|
|
const text = `${result.stdout || ''}\n${result.stderr || ''}`;
|
|
const summary = {
|
|
keyOffered: /Offering public key:/i.test(text) || /Will attempt key:/i.test(text),
|
|
keyAccepted: /Authenticated to .* using "publickey"/i.test(text) || /AUTH_CHECK_OK/i.test(text),
|
|
authFailed: /Permission denied|Authentication failed/i.test(text),
|
|
hostKeyFailed: /Host key verification failed|REMOTE HOST IDENTIFICATION HAS CHANGED/i.test(text),
|
|
networkFailed: /Connection timed out|No route to host|Connection refused|Could not resolve hostname|Operation timed out/i.test(text),
|
|
};
|
|
|
|
console.log(JSON.stringify(summary, null, 2));
|
|
|
|
process.exit(summary.keyAccepted ? 0 : 1);
|
|
}
|
|
|
|
main();
|