Merge pull request 'ws地址' (#434) from projects/zg-zjl into projects/zg-test
Reviewed-on: #434
This commit is contained in:
commit
94874a9d76
@ -21,7 +21,7 @@ VUE_APP_BASE_API = ''
|
|||||||
PUBLIC_PATH = ''
|
PUBLIC_PATH = ''
|
||||||
|
|
||||||
# ws地址
|
# ws地址
|
||||||
VUE_APP_WS_API = 'ws://100.64.0.45:48080'
|
VUE_APP_WS_API = 'ws://10.1.17.10:48080'
|
||||||
|
|
||||||
# 二级部署路径
|
# 二级部署路径
|
||||||
VUE_APP_APP_NAME ='yudao-admin'
|
VUE_APP_APP_NAME ='yudao-admin'
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -20,4 +20,6 @@ selenium-debug.log
|
|||||||
*.local
|
*.local
|
||||||
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
echarts.js
|
echarts.js
|
||||||
|
sync_line_sczg_prod.bat
|
||||||
|
sync_line_sczg_aliyun.bat
|
@ -1,68 +1,68 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
set cmdstr=rsync
|
set cmdstr=rsync
|
||||||
set zipfile=cwrsync.zip
|
set zipfile=cwrsync.zip
|
||||||
set downurl=https://itefix.net/download/free/cwrsync_6.3.0_x64_free.zip
|
set downurl=https://itefix.net/download/free/cwrsync_6.3.0_x64_free.zip
|
||||||
set currpath=%~dp0
|
set currpath=%~dp0
|
||||||
set "rsynchome=%ProgramFiles%\%zipfile:~0,-4%"
|
set "rsynchome=%ProgramFiles%\%zipfile:~0,-4%"
|
||||||
set passfile=%temp%\.password
|
set passfile=%temp%\.password
|
||||||
set syncdir=dist/
|
set syncdir=dist/
|
||||||
:: 以下需要配置同步服务器
|
:: 以下需要配置同步服务器
|
||||||
set accountwithost=kszny@100.64.0.45::line
|
set accountwithost=kszny@100.64.0.45::line
|
||||||
set "password=kszny@123"
|
set "password=kszny@123"
|
||||||
set "runcommand=%cmdstr% --port=873 -rlptvz --progress --password-file=%passfile% --exclude=google.exe --exclude=Lodap.zip %syncdir% %accountwithost%"
|
set "runcommand=%cmdstr% --port=873 -rlptvz --progress --password-file=%passfile% --exclude=google.exe --exclude=Lodap.zip %syncdir% %accountwithost%"
|
||||||
|
|
||||||
where %cmdstr% >nul 2>nul
|
where %cmdstr% >nul 2>nul
|
||||||
::有错误输出,说明不存在该命令
|
::有错误输出,说明不存在该命令
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
::还未下载安装包或未正常解压到安装目录
|
::还未下载安装包或未正常解压到安装目录
|
||||||
if not exist "%rsynchome%" (
|
if not exist "%rsynchome%" (
|
||||||
:: 请求提升管理员权限
|
:: 请求提升管理员权限
|
||||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\runAsAdmin.vbs"
|
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\runAsAdmin.vbs"
|
||||||
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\runAsAdmin.vbs"
|
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\runAsAdmin.vbs"
|
||||||
"%temp%\runAsAdmin.vbs"
|
"%temp%\runAsAdmin.vbs"
|
||||||
:: 需要提升管理员权限才能创建此目录
|
:: 需要提升管理员权限才能创建此目录
|
||||||
mkdir "%rsynchome%"
|
mkdir "%rsynchome%"
|
||||||
del "%temp%\runAsAdmin.vbs"
|
del "%temp%\runAsAdmin.vbs"
|
||||||
exit /B
|
exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
:: 使用powershell的curl下载软件包
|
:: 使用powershell的curl下载软件包
|
||||||
powershell curl -o %temp%\%zipfile% %downurl%
|
powershell curl -o %temp%\%zipfile% %downurl%
|
||||||
:: 解压
|
:: 解压
|
||||||
tar -xf "%temp%\%zipfile%" -C "%rsynchome%"
|
tar -xf "%temp%\%zipfile%" -C "%rsynchome%"
|
||||||
echo "%cmdstr%已经安装到了%rsynchome%目录下"
|
echo "%cmdstr%已经安装到了%rsynchome%目录下"
|
||||||
|
|
||||||
:: 检查路径是否存在于 PATH 中
|
:: 检查路径是否存在于 PATH 中
|
||||||
set "found=false"
|
set "found=false"
|
||||||
for %%I in ("%PATH:;=";"%") do (
|
for %%I in ("%PATH:;=";"%") do (
|
||||||
if /I "%%~I"=="%rsynchome%\bin" (
|
if /I "%%~I"=="%rsynchome%\bin" (
|
||||||
set "found=true"
|
set "found=true"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: 未设置到path变量中,添加到path变量
|
:: 未设置到path变量中,添加到path变量
|
||||||
if "!found!"=="false" (
|
if "!found!"=="false" (
|
||||||
:: 更新注册表中的 PATH 变量,通过setx方式,变量值长度超过1024个字符就会被截断
|
:: 更新注册表中的 PATH 变量,通过setx方式,变量值长度超过1024个字符就会被截断
|
||||||
reg add "HKCU\Environment" /v PATH /t REG_EXPAND_SZ /d "%PATH%;%rsynchome%\bin" /f
|
reg add "HKCU\Environment" /v PATH /t REG_EXPAND_SZ /d "%PATH%;%rsynchome%\bin" /f
|
||||||
)
|
)
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
::当前目录下没有dist目录
|
::当前目录下没有dist目录
|
||||||
if not exist "%currpath%%syncdir%" (
|
if not exist "%currpath%%syncdir%" (
|
||||||
echo 当前目录下没有需要同步的%syncdir%目录,请把需要同步的%syncdir%目录拷贝到当前目录下!
|
echo 当前目录下没有需要同步的%syncdir%目录,请把需要同步的%syncdir%目录拷贝到当前目录下!
|
||||||
) else (
|
) else (
|
||||||
echo !password!>%passfile%
|
echo !password!>%passfile%
|
||||||
echo 数据同步开始,请稍后...
|
echo 数据同步开始,请稍后...
|
||||||
!runcommand! && (
|
!runcommand! && (
|
||||||
echo 数据同步完成!
|
echo 数据同步完成!
|
||||||
) || (
|
) || (
|
||||||
echo !runcommand!
|
echo !runcommand!
|
||||||
echo 数据同步失败,请确认是否开启了VPN!
|
echo 数据同步失败,请确认是否开启了VPN!
|
||||||
)
|
)
|
||||||
del %passfile%
|
del %passfile%
|
||||||
)
|
)
|
||||||
|
|
||||||
endlocal
|
endlocal
|
||||||
pause
|
pause
|
||||||
|
Loading…
Reference in New Issue
Block a user