SVN版本号

1.脚本bat中,获取svn最新版本号:

set versionNum=0

for /f %%i in ('svn info --show-item revision') do (

set versionNum=%%i

)

2.在安卓项目中app目录下build.gradle中获取svn版本号:

task getGitVersion() {

def svnVersion ="1"

def svnVersionStream = ne ByteArrayOutputStream()

try{

exec {

executable "svn" args "info"

standardOutput = svnVersionStream

}

svnVersion = svnVersionStream.toString().find("Revision:(\d+)");

svnVersion = svnVersion.toString().find("(\d+)) ;

} catch (Exception e) {

println("svn not found"+ e.toString())

project.version = svnVersion

相关推荐
曹牧2 天前
Eclipse:SVN 回复
java·svn·eclipse
NexTunnel4 天前
公司老项目还在 SVN,远程维护怎么做更稳?
git·svn·gitlab·远程工作·nextunnel
鱼听禅5 天前
CentOS 源码模式配置SVNAdmin2管理SVN仓库
linux·svn·centos
_阿伟_7 天前
SVN简单使用教程
svn
NexTunnel7 天前
告别传统组网,也能安全访问公司 GitLab / SVN
安全·svn·gitlab
2601_9618752425 天前
花生十三公考课程|网课|视频
数据库·windows·git·svn·eclipse·github
2601_9618752425 天前
花生十三资料网盘|百度云|下载
数据库·windows·git·svn·eclipse·github
WSKH09291 个月前
【操作记录】Mac 系统安装并使用 SVN
macos·svn
不想努力只想躺平的菜鸟ing1 个月前
svn使用指南
svn
佛山个人技术开发1 个月前
GitCode个人技术开发者总结完整使用指南
windows·git·svn·github·gitcode