Merge pull request '更新' (#401) from projects/mes-zwq into projects/mes-test
Reviewed-on: #401
This commit is contained in:
commit
8e0ac6f962
13
.env.prod
13
.env.prod
@ -1,8 +1,8 @@
|
|||||||
###
|
###
|
||||||
# @Author: zhp
|
# @Author: zhp
|
||||||
# @Date: 2023-11-07 19:11:40
|
# @Date: 2023-11-07 19:11:40
|
||||||
# @LastEditTime: 2023-11-16 16:40:59
|
# @LastEditTime: 2024-10-17 09:09:05
|
||||||
# @LastEditors: zhp
|
# @LastEditors: zwq
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
@ -12,15 +12,18 @@ ENV = 'production'
|
|||||||
VUE_APP_TITLE = MES系统
|
VUE_APP_TITLE = MES系统
|
||||||
|
|
||||||
# 芋道管理系统/生产环境
|
# 芋道管理系统/生产环境
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
# VUE_APP_BASE_API = '/prod-api'
|
||||||
|
VUE_APP_BASE_API = ''
|
||||||
|
|
||||||
# 积木报表指向地址
|
# 积木报表指向地址
|
||||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
# VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||||
|
VUE_APP_JIMU_API = ''
|
||||||
|
|
||||||
|
|
||||||
# 根据服务器或域名修改
|
# 根据服务器或域名修改
|
||||||
# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
|
# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
|
||||||
PUBLIC_PATH = 'http://192.168.0.33:8889/'
|
# PUBLIC_PATH = 'http://192.168.0.33:8889/'
|
||||||
|
PUBLIC_PATH = ''
|
||||||
|
|
||||||
# 二级部署路径
|
# 二级部署路径
|
||||||
VUE_APP_APP_NAME ='yudao-admin'
|
VUE_APP_APP_NAME ='yudao-admin'
|
||||||
|
68
sync_mes2.bat
Normal file
68
sync_mes2.bat
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
set cmdstr=rsync
|
||||||
|
set zipfile=cwrsync.zip
|
||||||
|
set downurl=https://itefix.net/download/free/cwrsync_6.3.0_x64_free.zip
|
||||||
|
set currpath=%~dp0
|
||||||
|
set "rsynchome=%ProgramFiles%\%zipfile:~0,-4%"
|
||||||
|
set passfile=%temp%\.password
|
||||||
|
set syncdir=dist/
|
||||||
|
:: 以下需要配置同步服务器
|
||||||
|
set accountwithost=kszny@47.96.93.140::mes2
|
||||||
|
set "password=kszny@123"
|
||||||
|
set "runcommand=%cmdstr% --port=873 -rlptvz --progress --password-file=%passfile% --exclude=google.exe --exclude=Lodap.zip %syncdir% %accountwithost%"
|
||||||
|
|
||||||
|
where %cmdstr% >nul 2>nul
|
||||||
|
::有错误输出,说明不存在该命令
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
::还未下载安装包或未正常解压到安装目录
|
||||||
|
if not exist "%rsynchome%" (
|
||||||
|
:: 请求提升管理员权限
|
||||||
|
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\runAsAdmin.vbs"
|
||||||
|
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\runAsAdmin.vbs"
|
||||||
|
"%temp%\runAsAdmin.vbs"
|
||||||
|
:: 需要提升管理员权限才能创建此目录
|
||||||
|
mkdir "%rsynchome%"
|
||||||
|
del "%temp%\runAsAdmin.vbs"
|
||||||
|
exit /B
|
||||||
|
)
|
||||||
|
|
||||||
|
:: 使用powershell的curl下载软件包
|
||||||
|
powershell curl -o %temp%\%zipfile% %downurl%
|
||||||
|
:: 解压
|
||||||
|
tar -xf "%temp%\%zipfile%" -C "%rsynchome%"
|
||||||
|
echo "%cmdstr%已经安装到了%rsynchome%目录下"
|
||||||
|
|
||||||
|
:: 检查路径是否存在于 PATH 中
|
||||||
|
set "found=false"
|
||||||
|
for %%I in ("%PATH:;=";"%") do (
|
||||||
|
if /I "%%~I"=="%rsynchome%\bin" (
|
||||||
|
set "found=true"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:: 未设置到path变量中,添加到path变量
|
||||||
|
if "!found!"=="false" (
|
||||||
|
:: 更新注册表中的 PATH 变量,通过setx方式,变量值长度超过1024个字符就会被截断
|
||||||
|
reg add "HKCU\Environment" /v PATH /t REG_EXPAND_SZ /d "%PATH%;%rsynchome%\bin" /f
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
::当前目录下没有dist目录
|
||||||
|
if not exist "%currpath%%syncdir%" (
|
||||||
|
echo 当前目录下没有需要同步的%syncdir%目录,请把需要同步的%syncdir%目录拷贝到当前目录下!
|
||||||
|
) else (
|
||||||
|
echo !password!>%passfile%
|
||||||
|
echo 数据同步开始,请稍后...
|
||||||
|
!runcommand! && (
|
||||||
|
echo 数据同步完成!
|
||||||
|
) || (
|
||||||
|
echo !runcommand!
|
||||||
|
echo 数据同步失败,请确认是否开启了VPN!
|
||||||
|
)
|
||||||
|
del %passfile%
|
||||||
|
)
|
||||||
|
|
||||||
|
endlocal
|
||||||
|
pause
|
Loading…
Reference in New Issue
Block a user