{"id":1799,"date":"2020-04-18T08:50:52","date_gmt":"2020-04-18T00:50:52","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=1799"},"modified":"2020-04-25T21:00:01","modified_gmt":"2020-04-25T13:00:01","slug":"osx%e5%b9%b3%e5%8f%b0%e4%b8%8b%e4%bd%bf%e7%94%a8jenkins%e8%87%aa%e5%8a%a8%e5%8f%91%e5%b8%83unity%e4%b9%8bios%e7%a8%8b%e5%ba%8f%e4%b8%8e%e8%a1%a5%e4%b8%81","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=1799","title":{"rendered":"OSX\u5e73\u53f0\u4e0b\u4f7f\u7528Jenkins\u81ea\u52a8\u53d1\u5e03Unity\u4e4biOS\u7a0b\u5e8f\u4e0e\u8865\u4e01"},"content":{"rendered":"\n<p>\u7531\u4e8eUnity\u6784\u5efaAndroid\u7a0b\u5e8f\u653e\u5728Windows\u673a\u5668\u4e0a\uff0cJenkins\u4e5f\u5b89\u88c5\u4e8eWindows\u5e73\u53f0\u4e0a<\/p>\n\n\n\n<p>\u4e3a\u4e86\u4fbf\u4e8e\u4f7f\u7528\uff0c\u90a3\u4e48OSX\u4e0b\u9762\u81ea\u52a8\u53d1\u5e03\uff0c\u5c31\u4e0d\u5b89\u88c5Jenkins\u4e86\uff0c\u6539\u4e3a\u76f4\u63a5\u4f7f\u7528ssh\u547d\u4ee4\u8fdc\u7a0b\u8fde\u63a5\u5230OSX\u4e0a\u9762\u76f4\u63a5\u6267\u884cshell\u811a\u672c\u5373\u53ef\u3002<\/p>\n\n\n\n<p>\u4e00\u3001\u5728OSX\u4e0a\u9762\u65b0\u5efa \/User\/liu\/ios_build.sh, \u5185\u5bb9\u5982\u4e0b<\/p>\n\n\n\n<p>\/Applications\/Unity\/Unity.app\/Contents\/MacOS\/Unity&nbsp;-quit -batchmode -projectPath \/Users\/liu\/client -logFile \/tmp\/build.log -executeMethod CmdBuildPack.Build<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u4e3a\u53ef\u9009\u5185\u5bb9<\/p>\n\n\n\n<p>1\u3001\u5982\u679c\u8981\u5728\u6784\u5efa\u524d\u5148\u7528Perforce\u83b7\u5f97\u6700\u65b0\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u5148\u5230Perforce\u5b98\u7f51\u4e0a\u83b7\u5f97P4\u7684\u547d\u4ee4\u884c\u7a0b\u5e8f<\/p>\n\n\n\n<p>\u7136\u540e\u5728sh\u524d\u9762\u6dfb\u52a0\u4ee5\u4e0b\u793a\u4f8b\u5185\u5bb9<\/p>\n\n\n\n<p>export P4PORT=192.168.0.10:1666<br>\nexport P4CLIENT=client<br>\nexport P4USER=liu<br>\nexport P4CHARSET=utf8-bom<br>\nexport P4PASSWD=liu<br>\nexport P4ROOT=\/Users\/liu\/client\/<br>\n\/Applications\/p4 sync -q -f &nbsp;\/\/depot\/client<\/p>\n\n\n\n<p>2\u3001\u5982\u679c\u8981\u5728\u6784\u5efa\u5b8c\u6210\uff0c\u81ea\u52a8\u628a\u6587\u4ef6\u4e0a\u4f20\u5230\u6307\u5b9a\u670d\u52a1\u5668\u4e0a<\/p>\n\n\n\n<p>\u53ef\u4ee5\u5728sh\u540e\u9762\u6dfb\u52a0\u4ee5\u4e0b\u793a\u4f8b\u5185\u5bb9<\/p>\n\n\n\n<p>sshpass -p 123456 scp -r \/User\/liu\/ios_appstore root@121.121.121.121:\/var\/ios_files\/<\/p>\n\n\n\n<p>\u4e8c\u3001\u5728OSX\u4e0a\u9762\u5f00\u542fssh\u8fde\u63a5\u529f\u80fd<br>\n\u6253\u5f00\uff1a\u7cfb\u7edf\u504f\u597d\u8bbe\u7f6e\uff0c\u5171\u4eab\uff0c\u8fdc\u7a0b\u767b\u5f55 \u5373\u53ef\u3002<\/p>\n\n\n\n<p>\u4e09\u3001\u5728Windows\u4e4b\u7cfb\u7edf\u4e0a\u6dfb\u52a0d:\\autobuild.BAT<\/p>\n\n\n\n<p>\u5982\u679c\u4e0d\u77e5\u9053\u4ec0\u4e48\u662fplink\u53ef\u4ee5\u67e5\u4e00\u4e0b\u3002<\/p>\n\n\n\n<p>echo off<br>\nset _CMD=%1<br>\npushd &#8220;%~dp0&#8221;<br>\necho y| plink -pw 123456 root@192.168.0.14 %_CMD%<br>\npopd<\/p>\n\n\n\n<p>\u56db\u3001\u5728Jenkins\u7cfb\u7edf\u4e2d\u6dfb\u52a0\u6784\u5efa\u6b65\u9aa4<\/p>\n\n\n\n<p>call &#8220;d:\\autobuild.BAT&#8221; &#8220;source \/etc\/profile;\/Users\/liu\/ios_build.sh&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8eUnity\u6784\u5efaAndroid\u7a0b\u5e8f\u653e\u5728Windows\u673a\u5668\u4e0a\uff0cJenkins\u4e5f\u5b89\u88c5\u4e8eWindows\u5e73\u53f0\u4e0a \u4e3a\u4e86 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1799"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1799"}],"version-history":[{"count":1,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1799\/revisions"}],"predecessor-version":[{"id":1800,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1799\/revisions\/1800"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}