From 6a71c216a24a6623e4aa0b45d7c3240562c09c96 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期一, 17 二月 2025 10:38:17 +0800
Subject: [PATCH] 定位高亮

---
 deploy/deploy.config.js |   34 +++++++++++++++++++++++++++-------
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/deploy/deploy.config.js b/deploy/deploy.config.js
index ea9cf65..ce12396 100644
--- a/deploy/deploy.config.js
+++ b/deploy/deploy.config.js
@@ -1,3 +1,15 @@
+
+const testWebDir = 'E:/Wi/web/test';
+// 蹇界暐鍚屾鐨勭洰褰�
+const ignoreProj = ['prod'];
+// 鍚屾鏃堕渶瑕佷繚鐣欑殑鏂囦欢璺緞锛堢浉瀵硅矾寰勶級
+const ignoreSyncPath = ['static/config/globalConfig.js'];
+// 閮ㄧ讲鍚庡悓姝ユ枃浠跺埌鍚屽眰鍏朵粬椤圭洰鐩綍锛屼笖蹇界暐椤圭洰閰嶇疆鏂囦欢
+const remoteRunAfter = `cd /d ${testWebDir} && powershell -Command "$currentDir = Split-Path -Leaf (Get-Location); $ignoreDirs = @('${ignoreProj.join(
+	"','"
+)}', $currentDir); $ignoreSyncPaths = @('${ignoreSyncPath.join(
+	"','"
+)}'); $parentDir = Split-Path (Get-Location) -Parent; Get-ChildItem $parentDir -Directory | Where-Object { -not $ignoreDirs.Contains($_.Name) } | ForEach-Object { $targetDir = $_.FullName; $backupFiles = @{}; foreach ($ignorePath in $ignoreSyncPaths) { $fullIgnorePath = Join-Path $targetDir $ignorePath; if (Test-Path $fullIgnorePath) { $tempPath = Join-Path $env:TEMP ('backup_' + [guid]::NewGuid().ToString()); Copy-Item -Path $fullIgnorePath -Destination $tempPath -Force; $backupFiles[$ignorePath] = $tempPath; } }; Get-ChildItem $targetDir -Recurse | Where-Object { $_.FullName -ne $targetDir } | Remove-Item -Force -Recurse; Get-ChildItem -Path '.' -Recurse -File | Where-Object { $relativePath = $_.FullName.Substring((Get-Location).Path.Length + 1); $shouldCopy = $true; foreach ($ignorePath in $ignoreSyncPaths) { if ($relativePath -like $ignorePath) { $shouldCopy = $false; break; } }; $shouldCopy } | ForEach-Object { $relativePath = $_.FullName.Substring((Get-Location).Path.Length + 1); $targetPath = Join-Path $targetDir $relativePath; $targetParent = Split-Path $targetPath -Parent; if (-not (Test-Path $targetParent)) { New-Item -Path $targetParent -ItemType Directory -Force | Out-Null }; Copy-Item -Path $_.FullName -Destination $targetPath -Force }; foreach ($ignorePath in $ignoreSyncPaths) { if ($backupFiles.ContainsKey($ignorePath)) { $fullIgnorePath = Join-Path $targetDir $ignorePath; $parentFolder = Split-Path $fullIgnorePath -Parent; if (-not (Test-Path $parentFolder)) { New-Item -Path $parentFolder -ItemType Directory -Force | Out-Null }; Move-Item -Path $backupFiles[$ignorePath] -Destination $fullIgnorePath -Force } } }"`;
 module.exports = {
 	privateKeyPath: 'C:/ssh/id_rsa', // 鏈湴绉侀挜鍦板潃锛屼綅缃竴鑸湪C:/Users/xxx/.ssh/id_rsa锛岄潪蹇呭~锛屾湁绉侀挜鍒欓厤缃�
 	passphrase: '', // 鏈湴绉侀挜瀵嗙爜锛岄潪蹇呭~锛屾湁绉侀挜鍒欓厤缃�
@@ -7,13 +19,14 @@
 		// 娴嬭瘯鐜
 		name: '娴嬭瘯鐜',
 		preRun: '', // 娴嬭瘯鐜鎵撳寘鑴氭湰
-		host: '101.133.133.173', // 娴嬭瘯鏈嶅姟鍣ㄥ湴鍧�
+		host: '47.100.245.85', // 娴嬭瘯鏈嶅姟鍣ㄥ湴鍧�
 		port: 22, // ssh port锛屼竴鑸粯璁�22
 		username: 'Administrator', // 鐧诲綍鏈嶅姟鍣ㄧ敤鎴峰悕
 		password: '', // 鐧诲綍鏈嶅姟鍣ㄥ瘑鐮�
 		distPath: 'dist', // 鏈湴鎵撳寘dist鐩綍
-		webDir: 'E:/wi/web', // // 娴嬭瘯鐜鏈嶅姟鍣ㄥ湴鍧�
-		remoteIgnorePath: '', // 杩滅▼鏈嶅姟鍣ㄥ拷鐣ュ垹闄ゆ枃浠舵垨鏂囦欢澶癸紝鍙~鏁扮粍鎴栧瓧绗︿覆
+		webDir: testWebDir, // // 娴嬭瘯鐜鏈嶅姟鍣ㄥ湴鍧�
+
+		remoteIgnorePath: 'WI姘村姟鏅鸿兘鍔╂墜.apk', // 杩滅▼鏈嶅姟鍣ㄥ拷鐣ュ垹闄ゆ枃浠舵垨鏂囦欢澶癸紝鍙~鏁扮粍鎴栧瓧绗︿覆
 		// 澶囦唤
 		bakOld: {
 			// 澶囦唤涓暟锛屼笉濉粯璁� 3 涓�
@@ -21,9 +34,16 @@
 			// 鏄惁澶囦唤锛岄粯璁ゅ惎鐢ㄥ浠�
 			enable: true,
 		},
+		// 杩滅▼鎵ц鍛戒护
+		remoteRun: {
+			// 閮ㄧ讲鍓嶆墽琛屽懡浠�
+			before: '',
+			// 閮ㄧ讲鍚庢墽琛屽懡浠�
+			after: remoteRunAfter,
+		},
 		// 閮ㄧ讲棰勮
 		preview: {
-			url: 'http://101.133.133.173:8084/', // 閮ㄧ讲鍚庢鏌ラ儴缃叉晥鏋滐紝鏌ョ湅鐨勭綉椤靛湴鍧�
+			url: 'https://wi.beng35.com/web/test', // 閮ㄧ讲鍚庢鏌ラ儴缃叉晥鏋滐紝鏌ョ湅鐨勭綉椤靛湴鍧�
 			openInBrowser: false, // 閮ㄧ讲瀹屾垚鍚庢槸鍚﹁嚜鍔ㄦ墦寮�閮ㄧ讲鐨勭綉椤靛湴鍧�
 		},
 	},
@@ -31,13 +51,13 @@
 		// 绾夸笂鐜
 		name: '绾夸笂鐜',
 		preRun: '', // 绾夸笂鐜鎵撳寘鑴氭湰
-		host: '47.102.134.202', // 娴嬭瘯鏈嶅姟鍣ㄥ湴鍧�
+		host: '47.100.245.85', // 绾夸笂鏈嶅姟鍣ㄥ湴鍧�
 		port: 22, // ssh port锛屼竴鑸粯璁�22
 		username: 'administrator', // 鐧诲綍鏈嶅姟鍣ㄧ敤鎴峰悕
 		password: '', // 鐧诲綍鏈嶅姟鍣ㄥ瘑鐮�
 		distPath: 'dist', // 鏈湴鎵撳寘dist鐩綍
-		webDir: 'D:/YW/wi', // 娴嬭瘯鐜鏈嶅姟鍣ㄥ湴鍧�
-		remoteIgnorePath: '', // 杩滅▼鏈嶅姟鍣ㄥ拷鐣ュ垹闄ゆ枃浠舵垨鏂囦欢澶癸紝鍙~鏁扮粍鎴栧瓧绗︿覆
+		webDir: 'E:/Wi/web/prod',  // 绾夸笂鐜鏈嶅姟鍣ㄥ湴鍧�
+		remoteIgnorePath: 'WI姘村姟鏅鸿兘鍔╂墜.apk', // 杩滅▼鏈嶅姟鍣ㄥ拷鐣ュ垹闄ゆ枃浠舵垨鏂囦欢澶癸紝鍙~鏁扮粍鎴栧瓧绗︿覆
 		// 澶囦唤
 		bakOld: {
 			// 澶囦唤涓暟锛屼笉濉粯璁� 3 涓�

--
Gitblit v1.9.3