您的位置:首页 > 运维架构 > Shell

ant使用exec执行shell

2014-01-28 03:38 309 查看
<target name="versioncode">
        <exec executable="sh" outputproperty="v_code">
            <arg value="-c" />
            <arg value="svnversion | sed -e 's/^[^:]*://;s/[A-Za-z]//'" />
        </exec>
        <echo>Revision (app): ${v_code}</echo>
        <replaceregexp file="AndroidManifest.xml" match='android:versionCode="0"' replace='android:versionCode="${v_code}"' />
    </target>
向menifest中打入versionCode信息
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: