23 lines
468 B
Batchfile
23 lines
468 B
Batchfile
chcp 65001
|
|
@echo off
|
|
cd /d %~dp0
|
|
rem 读取版本配置文件
|
|
set configVersion=version.txt
|
|
for /f "tokens=1,2,3 delims=." %%a IN (%configVersion%) Do (
|
|
set tag1=%%a
|
|
set tag2=%%b
|
|
set tag3=%%c
|
|
)
|
|
set oldVersion=%tag1%.%tag2%.%tag3%
|
|
|
|
rem 替换
|
|
set d=%date: =0%
|
|
set t=%time: =0%
|
|
|
|
set productname=%oldVersion%.%d:~2,2%%d:~5,2%%d:~8,2%%t:~0,2%%t:~3,2%%t:~6,2%
|
|
echo 新版本号:%productname%
|
|
echo %productname%> versiontemp.txt
|
|
|
|
exit
|
|
|