【Jenkins 打包 Android】亦余心之所善兮,虽九死其犹未悔。这篇文章主要讲述Jenkins 打包 Android相关的知识,希望能为你提供帮助。
echo "
======building version======"
;
$versionDate=Get-Date -Format ‘yyyyMMddHHmmss‘;
echo "
v$versionDate"
;
$appPublishPath="
H:devopslive4it"
;
echo "
======svn change trigger======"
;
echo "
======cd Live4It dir======"
;
pushd H:SVNCodeMobileAppCTdevNewLive4It;
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 .appuildoutputsapk
elease;
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:SVNCodeMobileAppCTdevNewLive4Itsrcutilsappconfig.js);
$ret=[regex]::Matches($appconfig,‘vars+appInfos*=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======"
;
推荐阅读
- Invalid bound statement (not found): com.ruoyi.system.mapper.SysStudentMapper.selectSysStudentList(示
- call() apply() bind()方法 以及实现bind()方法
- 怎样删除空间好友?删除QQ空间好友的办法
- 如何赠送Q币?赠送Q币的办法
- mac版是啥意思?mac版意思介绍_其它聊天
- 毒奶粉是啥游戏?_其它聊天
- 不要碧莲是啥意思?不要碧莲是啥梗?_其它聊天
- 微信我最在行答题在啥地方里?微信我最在行答题玩法介绍_微信
- 机车是啥意思?台湾偶像剧里讲的“机车”是啥意思?_微信