- @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- set "file=build.txt"
- powershell -NoProfile -ExecutionPolicy bypass ^
- $Utf8NoBom=New-Object System.Text.UTF8Encoding $False;^
- $text=[IO.File]::ReadAllLines('%file%',$Utf8NoBom);^
- $a=[regex]::match($text[13],'^^(\s*?\S+\s+)(\S.+)');^
- $b=[regex]::match($text[16],'^^(\s*?\S+\s+)(\S.+)');^
- $c=[regex]::match($text[17],'^^(\s*?\S+\s+)(\S.+)');^
- write-host ('当前applicationId:'+$a.groups[2].value);^
- $f=$false;^
- while($f -eq $false){^
- $aa=read-host '请输入新applicationId';^
- if($aa -match '^^\"[\.a-z\d]+\"$'){^
- $f=$true;^
- };^
- };^
- write-host $aa;^
- $text[13]=$a.groups[1].value+$aa;^
- write-host ('当前versionCode:'+$b.groups[2].value);^
- $f=$false;^
- while($f -eq $false){^
- $bb=read-host '请输入新versionCode';^
- if($bb -match '^^\d+$'){^
- $f=$true;^
- };^
- };^
- write-host $bb;^
- $text[16]=$b.groups[1].value+$bb;^
- write-host ('当前versionName:'+$c.groups[2].value);^
- $f=$false;^
- while($f -eq $false){^
- $cc=read-host '请输入新versionName';^
- if($cc -match '^^\"[\.\d]+\"$'){^
- $f=$true;^
- };^
- };^
- write-host $cc;^
- $text[17]=$c.groups[1].value+$cc;^
- [IO.File]::WriteAllLines('%file%', $text, $Utf8NoBom);
- echo;%info%
- pause
复制代码
|