Jenkins 打包 Android
echo "======building version======"; $versionDate=Get-Date -Format ‘yyyyMMddHHmmss‘; echo "v$versionDate"; $appPublishPath="H:\devops\live4it"; echo "======svn change trigger======"; echo "======cd Live4It dir======"; pushd H:\SVNCode\MobileApp\CTdevNew\Live4It; echo "======svn update======"; svn update; echo "svn update success======"; echo "======begin publish======"; cd android; ./gradlew assembleRelease -console plain; echo "======publish success======"; echo "======list apks======"; cd .\app\build\outputs\apk\release; ls; echo "======copy apk======"; if(Test-Path $appPublishPath){} else{ mkdir $appPublishPath; } Copy-Item ./app-release.apk $appPublishPath –recurse; echo "======copy success======"; echo "======read version======"; $appconfig=(Get-Content H:\SVNCode\MobileApp\CTdevNew\Live4It\src\utils\appconfig.js); $ret=[regex]::Matches($appconfig,‘var\s+appInfo\s*=\s*\{"AppVersion"\s*:\s*"(?<version>.*?)"‘); $version=$ret.Groups[$ret.Groups.length-1].Value; echo "======read success======"; echo "======rename apk name======"; pushd $appPublishPath; Rename-Item ./app-release.apk "Live4It.$version.$versionDate.apk"; echo "======rename success======"; echo "======success======";
相关推荐
达观数据 2020-11-11
汪康 2020-10-30
ppppfly 2020-10-24
synshitou 2020-10-21
programmeryu 2020-09-24
Topbeyond 2020-08-21
lrcoop 2020-08-18
young依然 2020-08-17
oden 2020-08-16
lrcoop 2020-08-15
yserver 2020-08-15
王永迪 2020-08-15
pursuemylife 2020-08-14
pandaphinex 2020-08-09
leonranri 2020-07-26
CloasGao 2020-07-21
zccheu 2020-07-18